From 1b7061fdcac9bb53585e646686c0f2cc9ab3fbfa Mon Sep 17 00:00:00 2001 From: Milan Hauth Date: Thu, 16 May 2024 20:27:37 +0200 Subject: [PATCH] python3.pkgs.audalign: init at 1.2.4 --- default.nix | 2 + pkgs/python3/pkgs/audalign/default.nix | 91 ++++++++++++++++++++++++++ 2 files changed, 93 insertions(+) create mode 100644 pkgs/python3/pkgs/audalign/default.nix diff --git a/default.nix b/default.nix index 982cb1d..cee816a 100644 --- a/default.nix +++ b/default.nix @@ -369,6 +369,8 @@ pkgs.lib.makeScope pkgs.newScope (self: let inherit (self) callPackage; in rec { noisereduce = callPackage ./pkgs/python3/pkgs/noisereduce { }; + audalign = callPackage ./pkgs/python3/pkgs/audalign { }; + #}))); # python3.pkgs #}))); # python3 diff --git a/pkgs/python3/pkgs/audalign/default.nix b/pkgs/python3/pkgs/audalign/default.nix new file mode 100644 index 0000000..47f3fd3 --- /dev/null +++ b/pkgs/python3/pkgs/audalign/default.nix @@ -0,0 +1,91 @@ +{ lib +, python3 +, ffmpeg +, fetchFromGitHub +}: + +python3.pkgs.buildPythonApplication rec { + pname = "audalign"; + version = "1.2.4"; + pyproject = true; + + src = fetchFromGitHub { + owner = "benfmiller"; + repo = "audalign"; + rev = "v${version}"; + hash = "sha256-ldB4TxXfkmbTeslwARTjzrra+Xt+NZOeiFwrslIAEPc="; + }; + + postPatch = '' + # unpin versions + sed -i 's/==.*//' requirements.txt + # fix import check + # fix: cannot cache function 'x': no locator available + export NUMBA_CACHE_DIR=$TMP + ''; + + nativeBuildInputs = [ + python3.pkgs.setuptools + python3.pkgs.wheel + ]; + + propagatedBuildInputs = [ + ffmpeg + ] ++ (with python3.pkgs; [ + appdirs + attrs + audioread + certifi + cffi + charset-normalizer + contourpy + cycler + decorator + exceptiongroup + execnet + fonttools + idna + imageio + iniconfig + joblib + kiwisolver + librosa + llvmlite + matplotlib + networkx + noisereduce + numba + numpy + packaging + pillow + pluggy + pooch + pycparser + pydub + pyparsing + python-dateutil + pywavelets + requests + resampy + scikit-image + scikit-learn + scipy + six + soundfile + threadpoolctl + tifffile + tomli + tqdm + urllib3 + ]); + + pythonImportsCheck = [ "audalign" ]; + + meta = with lib; { + description = "Package for aligning audio files through audio fingerprinting"; + homepage = "https://github.com/benfmiller/audalign"; + changelog = "https://github.com/benfmiller/audalign/blob/${src.rev}/CHANGELOG.md"; + license = licenses.mit; + maintainers = with maintainers; [ ]; + }; +}