Merge pull request #284057 from sheepforce/dftd3-python

simple-dftd3: add python bindings
This commit is contained in:
markuskowa 2024-01-28 23:12:45 +01:00 committed by GitHub
commit dc279167b2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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

@ -13278,6 +13278,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 { };