From 6a4715fd1afdcf2e36ef074f86ab05cb02ae855c Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 17 Aug 2024 11:59:30 +0200 Subject: [PATCH] python312Packages.torch-pitch-shift: refactor - fix build --- .../torch-pitch-shift/default.nix | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/torch-pitch-shift/default.nix b/pkgs/development/python-modules/torch-pitch-shift/default.nix index f6d35338dad8..910b65c6363a 100644 --- a/pkgs/development/python-modules/torch-pitch-shift/default.nix +++ b/pkgs/development/python-modules/torch-pitch-shift/default.nix @@ -3,11 +3,11 @@ buildPythonPackage, fetchFromGitHub, setuptools, - wheel, packaging, primepy, torch, torchaudio, + pythonOlder, }: buildPythonPackage rec { @@ -15,30 +15,35 @@ buildPythonPackage rec { version = "1.2.4"; pyproject = true; + disabled = pythonOlder "3.8"; + src = fetchFromGitHub { owner = "KentoNishi"; repo = "torch-pitch-shift"; - rev = "v${version}"; + rev = "refs/tags/v${version}"; hash = "sha256-s3z+6jOGC7RfF9TzVZ9HFbIFz2BsBm6Yhx7lgaEKv6o="; }; - nativeBuildInputs = [ - setuptools - wheel - ]; + pythonRelaxDeps = [ "torchaudio" ]; - propagatedBuildInputs = [ + build-system = [ setuptools ]; + + dependencies = [ packaging primepy torch torchaudio ]; + # Module has no tests + doCheck = false; + pythonImportsCheck = [ "torch_pitch_shift" ]; meta = with lib; { description = "Pitch-shift audio clips quickly with PyTorch (CUDA supported)! Additional utilities for searching efficient transformations are included"; homepage = "https://github.com/KentoNishi/torch-pitch-shift"; + changelog = "https://github.com/KentoNishi/torch-pitch-shift/releases/tag/v${version}"; license = licenses.mit; maintainers = with maintainers; [ matthewcroughan ]; };