From dc552ab32e5cf266d3a4592323fbe7196169a1ab Mon Sep 17 00:00:00 2001 From: Chris Ostrouchov Date: Fri, 10 Aug 2018 16:46:44 -0400 Subject: [PATCH] pythonPackages.lammps-cython: init at 0.5.7 - python 3+ - all tests pass - fetchurl since project based in gitlab and to run tests --- .../python-modules/lammps-cython/default.nix | 53 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 4 ++ 2 files changed, 57 insertions(+) create mode 100644 pkgs/development/python-modules/lammps-cython/default.nix diff --git a/pkgs/development/python-modules/lammps-cython/default.nix b/pkgs/development/python-modules/lammps-cython/default.nix new file mode 100644 index 00000000000..501e4adc21d --- /dev/null +++ b/pkgs/development/python-modules/lammps-cython/default.nix @@ -0,0 +1,53 @@ +{ lib +, fetchurl +, buildPythonPackage +, lammps-mpi +, mpi +, mpi4py +, numpy +, cython +, pymatgen +, ase +, pytestrunner +, pytest +, 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 ]; + checkInputs = [ pytest pytestcov openssh ]; + 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"; + homepage = https://gitlab.com/costrouc/lammps-cython; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ costrouc ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index a74d0bc8579..f1499b5d42a 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -308,6 +308,10 @@ in { jira = callPackage ../development/python-modules/jira { }; + lammps-cython = callPackage ../development/python-modules/lammps-cython { + mpi = pkgs.openmpi; + }; + lmtpd = callPackage ../development/python-modules/lmtpd { }; logster = callPackage ../development/python-modules/logster { };