Skip to content

Commit

Permalink
cppe: init at 0.3.1
Browse files Browse the repository at this point in the history
cppe: move pytestCheckHook to checkInputs


cppe: hash


cppe: license and hash


cppe: formatting


python3.pkgs.cppe: more tests


cppe: formatting


cppe: formatting


cppe: platforms


cppe: platforms
  • Loading branch information
sheepforce committed Nov 22, 2021
1 parent a6a5114 commit 938a9e0
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 0 deletions.
25 changes: 25 additions & 0 deletions pkgs/development/libraries/science/chemistry/cppe/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{ stdenv, lib, fetchFromGitHub, cmake }:

stdenv.mkDerivation rec {
pname = "cppe";
version = "0.3.1";

src = fetchFromGitHub {
owner = "maxscheurer";
repo = pname;
rev = "v${version}";
sha256 = "sha256-guM7+ZWDJLcAUJtPkKLvC4LYSA2eBvER7cgwPZ7FxHw=";
};

nativeBuildInputs = [ cmake ];

cmakeFlags = [ "-DCMAKE_INSTALL_LIBDIR=lib" ];

meta = with lib; {
description = "C++ and Python library for Polarizable Embedding";
homepage = "https://github.com/maxscheurer/cppe";
license = licenses.lgpl3Only;
platforms = platforms.unix;
maintainers = [ maintainers.sheepforce ];
};
}
47 changes: 47 additions & 0 deletions pkgs/development/python-modules/cppe/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{ buildPythonPackage
, lib
, cmake
, cppe
, eigen
, python
, pybind11
, numpy
, h5py
, numba
, scipy
, pandas
, polarizationsolver
, pytest
}:

buildPythonPackage rec {
inherit (cppe) pname version src meta;

# The python interface requires eigen3, but builds from a checkout in tree.
# Using the nixpkgs version instead.
postPatch = ''
substituteInPlace setup.py \
--replace "external/eigen3" "${eigen}/include/eigen3"
'';

nativeBuildInputs = [
cmake
eigen
];

dontUseCmakeConfigure = true;

buildInputs = [ pybind11 ];

checkInputs = [
pytest
h5py
numba
numpy
pandas
polarizationsolver
scipy
];

pythonImportsCheck = [ "cppe" ];
}
2 changes: 2 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15923,6 +15923,8 @@ with pkgs;

ctpl = callPackage ../development/libraries/ctpl { };

cppe = callPackage ../development/libraries/science/chemistry/cppe { };

cppdb = callPackage ../development/libraries/cppdb { };

cpp-utilities = callPackage ../development/libraries/cpp-utilities { };
Expand Down
4 changes: 4 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -1765,6 +1765,10 @@ in {

cozy = callPackage ../development/python-modules/cozy { };

cppe = callPackage ../development/python-modules/cppe {
cppe = pkgs.cppe;
};

cppheaderparser = callPackage ../development/python-modules/cppheaderparser { };

cppy = callPackage ../development/python-modules/cppy { };
Expand Down

0 comments on commit 938a9e0

Please sign in to comment.