Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / energyflow / default.nix
blob5f89337f0de22bb5468683b011919ab92255e716
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , h5py
5 , numpy
6 , six
7 , wasserstein
8 , pytestCheckHook
9 }:
11 buildPythonPackage rec {
12   pname = "EnergyFlow";
13   version = "1.3.2";
15   src = fetchFromGitHub {
16     owner = "pkomiske";
17     repo = pname;
18     rev = "v${version}";
19     hash = "sha256-fjT8c0ZTjdufP334upPzRVdTJDIBs84I7PkFu4CMcQw=";
20   };
22   postPatch = ''
23     substituteInPlace setup.cfg \
24       --replace "setup_requires=" "" \
25       --replace "pytest-runner" ""
26   '';
28   propagatedBuildInputs = [
29     h5py
30     numpy
31     six
32     wasserstein
33   ];
35   nativeCheckInputs = [
36     pytestCheckHook
37   ];
38   pytestFlagsArray = [
39     "energyflow/tests"
40   ];
41   disabledTestPaths = [
42     "energyflow/tests/test_archs.py" # requires tensorflow
43     "energyflow/tests/test_emd.py" # requires "ot"
44   ];
46   pythonImportsCheck = [ "energyflow" ];
48   meta = with lib; {
49     description = "Python package for the EnergyFlow suite of tools";
50     homepage = "https://energyflow.network/";
51     license = licenses.gpl3Only;
52     maintainers = with maintainers; [ veprbl ];
53   };