diff options
Diffstat (limited to 'pkgs/development/python-modules/pytorch-msssim/default.nix')
-rw-r--r-- | pkgs/development/python-modules/pytorch-msssim/default.nix | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/pytorch-msssim/default.nix b/pkgs/development/python-modules/pytorch-msssim/default.nix new file mode 100644 index 00000000000..371ae7514ae --- /dev/null +++ b/pkgs/development/python-modules/pytorch-msssim/default.nix @@ -0,0 +1,41 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, setuptools +, wheel +, torch +}: + +buildPythonPackage rec { + pname = "pytorch-msssim"; + version = "1.0.0"; + pyproject = true; + + src = fetchFromGitHub { + owner = "VainF"; + repo = "pytorch-msssim"; + rev = "refs/tags/v${version}"; + hash = "sha256-bghglwQhgByC7BqbDvImSvt6edKF55NLYEPjqmmSFH8="; + }; + + nativeBuildInputs = [ + setuptools + wheel + ]; + + propagatedBuildInputs = [ + torch + ]; + + pythonImportsCheck = [ "pytorch_msssim" ]; + + # This test doesn't have (automatic) tests + doCheck = false; + + meta = with lib; { + description = "Fast and differentiable MS-SSIM and SSIM for pytorch"; + homepage = "https://github.com/VainF/pytorch-msssim"; + license = licenses.mit; + maintainers = with maintainers; [ GaetanLepage ]; + }; +} |