2018-08-10 21:46:44 +01:00
|
|
|
{ lib
|
|
|
|
, fetchurl
|
|
|
|
, buildPythonPackage
|
|
|
|
, lammps-mpi
|
|
|
|
, mpi
|
|
|
|
, mpi4py
|
|
|
|
, numpy
|
|
|
|
, cython
|
|
|
|
, pymatgen
|
|
|
|
, ase
|
|
|
|
, pytestrunner
|
2019-09-27 18:53:55 +01:00
|
|
|
, pytest_4
|
2018-08-10 21:46:44 +01:00
|
|
|
, pytestcov
|
|
|
|
, isPy3k
|
|
|
|
, openssh
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "lammps-cython";
|
|
|
|
version = "0.5.7";
|
|
|
|
disabled = (!isPy3k);
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://gitlab.com/costrouc/${pname}/-/archive/v${version}/${pname}-v${version}.tar.gz";
|
|
|
|
sha256 = "1wj9scmjdl00af13b5ihfccrjpikrdgkzd88ialam1nkxvxi42bl";
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ cython pytestrunner ];
|
2019-09-27 18:53:55 +01:00
|
|
|
checkInputs = [ pytest_4 pytestcov openssh ];
|
2018-08-10 21:46:44 +01:00
|
|
|
propagatedBuildInputs = [ mpi4py pymatgen ase numpy ];
|
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
echo "Creating lammps.cfg file..."
|
|
|
|
cat << EOF > lammps.cfg
|
|
|
|
[lammps]
|
|
|
|
lammps_include_dir = ${lammps-mpi}/include
|
|
|
|
lammps_library_dir = ${lammps-mpi}/lib
|
|
|
|
lammps_library = lammps_mpi
|
|
|
|
|
|
|
|
[mpi]
|
|
|
|
mpi_include_dir = ${mpi}/include
|
|
|
|
mpi_library_dir = ${mpi}/lib
|
|
|
|
mpi_library = mpi
|
|
|
|
EOF
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Pythonic Wrapper to LAMMPS using cython";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://gitlab.com/costrouc/lammps-cython";
|
2018-08-10 21:46:44 +01:00
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = with lib.maintainers; [ costrouc ];
|
|
|
|
};
|
|
|
|
}
|