1{ lib
2, fetchurl
3, buildPythonPackage
4, lammps-mpi
5, mpi
6, mpi4py
7, numpy
8, cython
9, pymatgen
10, ase
11, pytestrunner
12, pytest
13, pytestcov
14, isPy3k
15, openssh
16}:
17
18buildPythonPackage rec {
19 pname = "lammps-cython";
20 version = "0.5.7";
21 disabled = (!isPy3k);
22
23 src = fetchurl {
24 url = "https://gitlab.com/costrouc/${pname}/-/archive/v${version}/${pname}-v${version}.tar.gz";
25 sha256 = "1wj9scmjdl00af13b5ihfccrjpikrdgkzd88ialam1nkxvxi42bl";
26 };
27
28 buildInputs = [ cython pytestrunner ];
29 checkInputs = [ pytest pytestcov openssh ];
30 propagatedBuildInputs = [ mpi4py pymatgen ase numpy ];
31
32 preBuild = ''
33 echo "Creating lammps.cfg file..."
34 cat << EOF > lammps.cfg
35 [lammps]
36 lammps_include_dir = ${lammps-mpi}/include
37 lammps_library_dir = ${lammps-mpi}/lib
38 lammps_library = lammps_mpi
39
40 [mpi]
41 mpi_include_dir = ${mpi}/include
42 mpi_library_dir = ${mpi}/lib
43 mpi_library = mpi
44 EOF
45 '';
46
47 meta = {
48 description = "Pythonic Wrapper to LAMMPS using cython";
49 homepage = https://gitlab.com/costrouc/lammps-cython;
50 license = lib.licenses.mit;
51 maintainers = with lib.maintainers; [ costrouc ];
52 };
53}