This reverts commit65a333600d. This wasn't tested for correctness with something like fodwatch [0], and should not have been (self-)merged so quickly, especially without further review. It also resulted in the breakage of at least one package [1] (and that's the one we know of and was caught). A few packages that were updated in between this commit and this revert were not reverted back to using `rev`, but other than that, this is a 1:1 revert. [0]: https://codeberg.org/raphaelr/fodwatch [1]: https://github.com/NixOS/nixpkgs/pull/396904 /758551e458
55 lines
1.3 KiB
Nix
55 lines
1.3 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
fetchpatch,
|
|
numpy,
|
|
llvmPackages,
|
|
wurlitzer,
|
|
pytestCheckHook,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "wasserstein";
|
|
version = "1.1.0";
|
|
format = "setuptools";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "pkomiske";
|
|
repo = "Wasserstein";
|
|
rev = "v${version}";
|
|
hash = "sha256-s9en6XwvO/WPsF7/+SEmGePHZQgl7zLgu5sEn4nD9YE=";
|
|
};
|
|
|
|
patches = [
|
|
(fetchpatch {
|
|
url = "https://github.com/thaler-lab/Wasserstein/commit/8667d59dfdf89eabf01f3ae93b23a30a27c21c58.patch";
|
|
hash = "sha256-jp5updB3E1MYgLhBJwmBMTwBiFXtABMwTxt0G6xhoyA=";
|
|
})
|
|
];
|
|
|
|
buildInputs = [ llvmPackages.openmp ];
|
|
propagatedBuildInputs = [
|
|
numpy
|
|
wurlitzer
|
|
];
|
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
|
pytestFlagsArray = [ "wasserstein/tests" ];
|
|
disabledTestPaths = [
|
|
"wasserstein/tests/test_emd.py" # requires "ot"
|
|
# cyclic dependency on energyflow
|
|
"wasserstein/tests/test_externalemdhandler.py"
|
|
"wasserstein/tests/test_pairwiseemd.py"
|
|
];
|
|
|
|
pythonImportsCheck = [ "wasserstein" ];
|
|
|
|
meta = with lib; {
|
|
description = "Python/C++ library for computing Wasserstein distances efficiently";
|
|
homepage = "https://github.com/pkomiske/Wasserstein";
|
|
license = licenses.gpl3Only;
|
|
maintainers = with maintainers; [ veprbl ];
|
|
};
|
|
}
|