simple-dftd3: add python bindings

This commit is contained in:
Phillip Seeber 2024-01-26 17:56:20 +01:00
parent 67702f1074
commit c5acc7a3a9
2 changed files with 46 additions and 0 deletions

View File

@ -0,0 +1,42 @@
{ buildPythonPackage
, pkg-config
, meson
, simple-dftd3
, cffi
, numpy
, toml
, qcengine
, pyscf
, ase
, pytestCheckHook
}:
buildPythonPackage {
inherit (simple-dftd3) pname version src meta;
# pytest is also required for installation, not only testing
nativeBuildInputs = [ pytestCheckHook ];
buildInputs = [ simple-dftd3 ];
propagatedBuildInputs = [
cffi
numpy
toml
];
checkInputs = [
ase
qcengine
pyscf
];
preConfigure = ''
cd python
'';
# The compiled CFFI is not placed correctly before pytest invocation
preCheck = ''
find . -name "_libdftd3*" -exec cp {} ./dftd3/. \;
'';
}

View File

@ -13272,6 +13272,10 @@ self: super: with self; {
simplesat = callPackage ../development/python-modules/simplesat { };
simple-dftd3 = callPackage ../development/libraries/science/chemistry/simple-dftd3/python.nix {
inherit (pkgs) simple-dftd3;
};
simple-di = callPackage ../development/python-modules/simple-di { };
simple-rest-client = callPackage ../development/python-modules/simple-rest-client { };