1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 setuptools,
6 wheel,
7 torch,
8}:
9
10buildPythonPackage rec {
11 pname = "pytorch-msssim";
12 version = "1.0.0";
13 pyproject = true;
14
15 src = fetchFromGitHub {
16 owner = "VainF";
17 repo = "pytorch-msssim";
18 tag = "v${version}";
19 hash = "sha256-bghglwQhgByC7BqbDvImSvt6edKF55NLYEPjqmmSFH8=";
20 };
21
22 nativeBuildInputs = [
23 setuptools
24 wheel
25 ];
26
27 propagatedBuildInputs = [ torch ];
28
29 pythonImportsCheck = [ "pytorch_msssim" ];
30
31 # This test doesn't have (automatic) tests
32 doCheck = false;
33
34 meta = with lib; {
35 description = "Fast and differentiable MS-SSIM and SSIM for pytorch";
36 homepage = "https://github.com/VainF/pytorch-msssim";
37 license = licenses.mit;
38 maintainers = with maintainers; [ GaetanLepage ];
39 };
40}