Skip to content

Commit

Permalink
simple-dftd3: add python bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
sheepforce committed Jan 26, 2024
1 parent 67702f1 commit c5acc7a
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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/. \;
'';
}
4 changes: 4 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 { };
Expand Down

0 comments on commit c5acc7a

Please sign in to comment.