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