cppe: init at 0.3.1

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
This commit is contained in:
Phillip Seeber 2021-11-10 12:30:09 +01:00
parent a6a5114653
commit 938a9e00c5
4 changed files with 78 additions and 0 deletions

View File

@ -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 ];
};
}

View File

@ -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" ];
}

View File

@ -15923,6 +15923,8 @@ with pkgs;
ctpl = callPackage ../development/libraries/ctpl { }; ctpl = callPackage ../development/libraries/ctpl { };
cppe = callPackage ../development/libraries/science/chemistry/cppe { };
cppdb = callPackage ../development/libraries/cppdb { }; cppdb = callPackage ../development/libraries/cppdb { };
cpp-utilities = callPackage ../development/libraries/cpp-utilities { }; cpp-utilities = callPackage ../development/libraries/cpp-utilities { };

View File

@ -1765,6 +1765,10 @@ in {
cozy = callPackage ../development/python-modules/cozy { }; cozy = callPackage ../development/python-modules/cozy { };
cppe = callPackage ../development/python-modules/cppe {
cppe = pkgs.cppe;
};
cppheaderparser = callPackage ../development/python-modules/cppheaderparser { }; cppheaderparser = callPackage ../development/python-modules/cppheaderparser { };
cppy = callPackage ../development/python-modules/cppy { }; cppy = callPackage ../development/python-modules/cppy { };