diff options
Diffstat (limited to 'pkgs/tools/audio')
-rw-r--r-- | pkgs/tools/audio/abcmidi/default.nix | 4 | ||||
-rw-r--r-- | pkgs/tools/audio/audiowaveform/default.nix | 4 | ||||
-rw-r--r-- | pkgs/tools/audio/beets/builtin-plugins.nix | 14 | ||||
-rw-r--r-- | pkgs/tools/audio/beets/common.nix | 16 | ||||
-rw-r--r-- | pkgs/tools/audio/beets/default.nix | 2 | ||||
-rw-r--r-- | pkgs/tools/audio/openai-whisper-cpp/default.nix | 56 | ||||
-rw-r--r-- | pkgs/tools/audio/patray/default.nix | 4 |
7 files changed, 88 insertions, 12 deletions
diff --git a/pkgs/tools/audio/abcmidi/default.nix b/pkgs/tools/audio/abcmidi/default.nix index 5154fccc81c09..f4d51e4815839 100644 --- a/pkgs/tools/audio/abcmidi/default.nix +++ b/pkgs/tools/audio/abcmidi/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "abcMIDI"; - version = "2023.12.28"; + version = "2024.01.04"; src = fetchzip { url = "https://ifdo.ca/~seymour/runabc/${pname}-${version}.zip"; - hash = "sha256-HOwHmn67ZT2h0MKV1wxv1pINUv/5S4AgafGBM1PEBzY="; + hash = "sha256-IsQ+lAmQQGitKRlQUc7PgRKgwlEgYsR5q2XHp9k7tEM="; }; meta = with lib; { diff --git a/pkgs/tools/audio/audiowaveform/default.nix b/pkgs/tools/audio/audiowaveform/default.nix index a5fff36322e40..0e7b9df402435 100644 --- a/pkgs/tools/audio/audiowaveform/default.nix +++ b/pkgs/tools/audio/audiowaveform/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "audiowaveform"; - version = "1.9.1"; + version = "1.10.0"; src = fetchFromGitHub { owner = "bbc"; repo = "audiowaveform"; rev = version; - sha256 = "sha256-qnidR+V2CwDnztUv73k72lVyH+B1yfb3c7BLus4P6Wk="; + sha256 = "sha256-I9reh4ktBOvhtjh5L1LzpkZSjDb0adIYJFtjGfBBvA8="; }; nativeBuildInputs = [ cmake gtest ]; diff --git a/pkgs/tools/audio/beets/builtin-plugins.nix b/pkgs/tools/audio/beets/builtin-plugins.nix index e3bc102104418..c6ae24dc6906e 100644 --- a/pkgs/tools/audio/beets/builtin-plugins.nix +++ b/pkgs/tools/audio/beets/builtin-plugins.nix @@ -9,11 +9,13 @@ , mp3gain , mp3val , python3Packages +, version , ... }: { absubmit = { enable = lib.elem stdenv.hostPlatform.system essentia-extractor.meta.platforms; wrapperBins = [ essentia-extractor ]; + testPaths = [ ]; }; acousticbrainz.propagatedBuildInputs = [ python3Packages.requests ]; albumtypes = { }; @@ -122,4 +124,16 @@ unimported.testPaths = [ ]; web.propagatedBuildInputs = [ python3Packages.flask ]; zero = { }; + # NOTE: Condition can be removed once stable beets updates +} // lib.optionalAttrs ((lib.versions.majorMinor version) != "1.6") { + limit = { }; + substitute = { + testPaths = [ ]; + }; + advancedrewrite = { + testPaths = [ ]; + }; + autobpm = { + testPaths = [ ]; + }; } diff --git a/pkgs/tools/audio/beets/common.nix b/pkgs/tools/audio/beets/common.nix index d4e589f098e4e..fb8b6be0ed8a6 100644 --- a/pkgs/tools/audio/beets/common.nix +++ b/pkgs/tools/audio/beets/common.nix @@ -36,7 +36,21 @@ let inherit (lib) attrNames attrValues concatMap; - mkPlugin = { name, enable ? !disableAllPlugins, builtin ? false, propagatedBuildInputs ? [ ], testPaths ? [ "test/test_${name}.py" ], wrapperBins ? [ ] }: { + mkPlugin = { name + , enable ? !disableAllPlugins + , builtin ? false + , propagatedBuildInputs ? [ ] + , testPaths ? [ + # NOTE: This conditional can be removed when beets-stable is updated and + # the default plugins test path is changed + (if (lib.versions.majorMinor version) == "1.6" then + "test/test_${name}.py" + else + "test/plugins/test_${name}.py" + ) + ] + , wrapperBins ? [ ] + }: { inherit name enable builtin propagatedBuildInputs testPaths wrapperBins; }; diff --git a/pkgs/tools/audio/beets/default.nix b/pkgs/tools/audio/beets/default.nix index ba468895cc41a..391974c4a4fd1 100644 --- a/pkgs/tools/audio/beets/default.nix +++ b/pkgs/tools/audio/beets/default.nix @@ -22,6 +22,8 @@ lib.makeExtensible (self: { beets-stable = callPackage ./common.nix rec { inherit python3Packages; + # NOTE: ./builtin-plugins.nix and ./common.nix can have some conditionals + # be removed when stable version updates version = "1.6.0"; src = fetchFromGitHub { owner = "beetbox"; diff --git a/pkgs/tools/audio/openai-whisper-cpp/default.nix b/pkgs/tools/audio/openai-whisper-cpp/default.nix index 7a6a0baa82de2..e2fd352422a8e 100644 --- a/pkgs/tools/audio/openai-whisper-cpp/default.nix +++ b/pkgs/tools/audio/openai-whisper-cpp/default.nix @@ -9,16 +9,26 @@ , CoreML , CoreVideo , MetalKit + +, config +, cudaSupport ? config.cudaSupport +, cudaPackages ? {} }: -stdenv.mkDerivation rec { +let + # It's necessary to consistently use backendStdenv when building with CUDA support, + # otherwise we get libstdc++ errors downstream. + # cuda imposes an upper bound on the gcc version, e.g. the latest gcc compatible with cudaPackages_11 is gcc11 + effectiveStdenv = if cudaSupport then cudaPackages.backendStdenv else stdenv; +in +effectiveStdenv.mkDerivation (finalAttrs: { pname = "whisper-cpp"; version = "1.5.4"; src = fetchFromGitHub { owner = "ggerganov"; repo = "whisper.cpp"; - rev = "refs/tags/v${version}" ; + rev = "refs/tags/v${finalAttrs.version}" ; hash = "sha256-9H2Mlua5zx2WNXbz2C5foxIteuBgeCNALdq5bWyhQCk="; }; @@ -28,13 +38,49 @@ stdenv.mkDerivation rec { # the models to the current directory of where it is being run from. patches = [ ./download-models.patch ]; - nativeBuildInputs = [ makeWrapper ]; + nativeBuildInputs = [ + makeWrapper + ] ++ lib.optionals cudaSupport ( with cudaPackages ;[ + cuda_nvcc + + # TODO: Replace with autoAddDriverRunpath + # once https://github.com/NixOS/nixpkgs/pull/275241 has been merged + autoAddOpenGLRunpathHook + ]); + + buildInputs = [ + SDL2 + ] ++ lib.optionals stdenv.isDarwin [ + Accelerate + CoreGraphics + CoreML + CoreVideo + MetalKit + ] ++ lib.optionals cudaSupport ( with cudaPackages; [ - buildInputs = [ SDL2 ] ++ lib.optionals stdenv.isDarwin [ Accelerate CoreGraphics CoreML CoreVideo MetalKit ]; + # A temporary hack for reducing the closure size, remove once cudaPackages + # have stopped using lndir: https://github.com/NixOS/nixpkgs/issues/271792 + cuda_cudart.dev + cuda_cudart.lib + cuda_cudart.static + libcublas.dev + libcublas.lib + libcublas.static + ]); + + postPatch = let + cudaOldStr = "-lcuda "; + cudaNewStr = "-lcuda -L${cudaPackages.cuda_cudart.lib}/lib/stubs "; + in lib.optionalString cudaSupport '' + substituteInPlace Makefile \ + --replace '${cudaOldStr}' '${cudaNewStr}' + ''; env = lib.optionalAttrs stdenv.isDarwin { WHISPER_COREML = "1"; WHISPER_COREML_ALLOW_FALLBACK = "1"; + } // lib.optionalAttrs cudaSupport { + WHISPER_CUBLAS = "1"; }; makeFlags = [ "main" "stream" "command" ]; @@ -75,4 +121,4 @@ stdenv.mkDerivation rec { platforms = platforms.all; maintainers = with maintainers; [ dit7ya hughobrien ]; }; -} +}) diff --git a/pkgs/tools/audio/patray/default.nix b/pkgs/tools/audio/patray/default.nix index e6800d943725d..90c8719b48b31 100644 --- a/pkgs/tools/audio/patray/default.nix +++ b/pkgs/tools/audio/patray/default.nix @@ -6,11 +6,11 @@ python3.pkgs.buildPythonApplication rec { pname = "patray"; - version = "0.1.1"; + version = "0.1.2"; src = fetchPypi { inherit version pname; - sha256 = "0vaapn2p4257m1d5nbnwnh252b7lhl00560gr9pqh2b7xqm1bh6g"; + sha256 = "sha256-O8CBUexL2V1qI7bB/Lns3yjUvFOpC6spd/6asXa5+pw="; }; patchPhase = '' |