diff options
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/audio')
27 files changed, 984 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/audio/libbass/default.nix b/nixpkgs/pkgs/development/libraries/audio/libbass/default.nix new file mode 100644 index 000000000000..a8648a1a1c7b --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/audio/libbass/default.nix @@ -0,0 +1,68 @@ +{ lib, stdenv, unzip, fetchurl }: + +# Upstream changes files in-place, to update: +# 1. Check latest version at http://www.un4seen.com/ +# 2. Update `version`s and `sha256` sums. +# See also http://www.un4seen.com/forum/?topic=18614.0 + +let + allBass = { + bass = { + h = "bass.h"; + version = "2.4.15"; + so = { + i686_linux = "libbass.so"; + x86_64-linux = "x64/libbass.so"; + }; + urlpath = "bass24-linux.zip"; + sha256 = "1lmysxfhy727zskavml3ibg5w876ir88923bm17c21s59w5lh7l8"; + }; + + bass_fx = { + h = "C/bass_fx.h"; + version = "2.4.12.1"; + so = { + i686_linux = "libbass_fx.so"; + x86_64-linux = "x64/libbass_fx.so"; + }; + urlpath = "z/0/bass_fx24-linux.zip"; + sha256 = "1q0g74z7iyhxqps5b3gnnbic8v2jji1r0mkvais57lsx8y21sbin"; + }; + }; + + dropBass = name: bass: stdenv.mkDerivation { + pname = "lib${name}"; + inherit (bass) version; + + src = fetchurl { + url = "https://www.un4seen.com/files/${bass.urlpath}"; + inherit (bass) sha256; + }; + unpackCmd = '' + mkdir out + ${unzip}/bin/unzip $curSrc -d out + ''; + + lpropagatedBuildInputs = [ unzip ]; + dontBuild = true; + installPhase = + let so = + if bass.so ? ${stdenv.hostPlatform.system} then bass.so.${stdenv.hostPlatform.system} + else throw "${name} not packaged for ${stdenv.hostPlatform.system} (yet)."; + in '' + mkdir -p $out/{lib,include} + install -m644 -t $out/lib/ ${so} + install -m644 -t $out/include/ ${bass.h} + ''; + + meta = with lib; { + description = "Shareware audio library"; + homepage = "https://www.un4seen.com/"; + license = licenses.unfreeRedistributable; + platforms = builtins.attrNames bass.so; + # until upstream has stable URLs, this package is prone to always being broken + broken = true; + }; + }; + +in lib.mapAttrs dropBass allBass diff --git a/nixpkgs/pkgs/development/libraries/audio/libbs2b/default.nix b/nixpkgs/pkgs/development/libraries/audio/libbs2b/default.nix new file mode 100644 index 000000000000..720823852b02 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/audio/libbs2b/default.nix @@ -0,0 +1,30 @@ +{ lib, stdenv, fetchurl, pkg-config, libsndfile }: + +stdenv.mkDerivation rec { + pname = "libbs2b"; + version = "3.1.0"; + + src = fetchurl { + url = "mirror://sourceforge/bs2b/${pname}-${version}.tar.bz2"; + sha256 = "0vz442kkjn2h0dlxppzi4m5zx8qfyrivq581n06xzvnyxi5rg6a7"; + }; + + nativeBuildInputs = [ pkg-config ]; + buildInputs = [ libsndfile ]; + + configureFlags = [ + # Required for cross-compilation. + # Prevents linking error with 'undefined reference to rpl_malloc'. + # I think it's safe to assume that most libcs will properly handle + # realloc(NULL, size) and treat it like malloc(size). + "ac_cv_func_malloc_0_nonnull=yes" + ]; + hardeningDisable = [ "format" ]; + + meta = { + homepage = "http://bs2b.sourceforge.net/"; + description = "Bauer stereophonic-to-binaural DSP library"; + license = lib.licenses.mit; + platforms = lib.platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/audio/libgme/default.nix b/nixpkgs/pkgs/development/libraries/audio/libgme/default.nix new file mode 100644 index 000000000000..d78756b0ca45 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/audio/libgme/default.nix @@ -0,0 +1,34 @@ +{ lib, stdenv, fetchFromBitbucket, cmake, removeReferencesTo }: + +stdenv.mkDerivation rec { + pname = "libgme"; + version = "0.6.3"; + + meta = with lib; { + description = "A collection of video game music chip emulators"; + homepage = "https://bitbucket.org/mpyne/game-music-emu/overview"; + license = licenses.lgpl21; + platforms = platforms.all; + maintainers = with maintainers; [ lheckemann ]; + }; + + src = fetchFromBitbucket { + owner = "mpyne"; + repo = "game-music-emu"; + rev = version; + sha256 = "100ahb4n4pvgcry9xzlf2fr4j57n5h9x7pvyhhxys4dcy8axqqsy"; + }; + + nativeBuildInputs = [ cmake removeReferencesTo ]; + + # These checks fail on aarch64-darwin + cmakeFlags = [ "-DENABLE_UBSAN=OFF" ]; + + # It used to reference it, in the past, but thanks to the postFixup hook, now + # it doesn't. + disallowedReferences = [ stdenv.cc.cc ]; + + postFixup = lib.optionalString stdenv.isLinux '' + remove-references-to -t ${stdenv.cc.cc} "$(readlink -f $out/lib/libgme.so)" + ''; +} diff --git a/nixpkgs/pkgs/development/libraries/audio/libinstpatch/default.nix b/nixpkgs/pkgs/development/libraries/audio/libinstpatch/default.nix new file mode 100644 index 000000000000..670dee26b2bf --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/audio/libinstpatch/default.nix @@ -0,0 +1,29 @@ +{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, glib, libsndfile }: + +stdenv.mkDerivation rec { + pname = "libinstpatch"; + version = "1.1.6"; + + src = fetchFromGitHub { + owner = "swami"; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-OU6/slrPDgzn9tvXZJKSWbcFbpS/EAsOi52FtjeYdvA="; + }; + + nativeBuildInputs = [ cmake pkg-config ]; + + propagatedBuildInputs = [ glib libsndfile ]; # Both are needed for includes. + + cmakeFlags = [ + "-DLIB_SUFFIX=" # Install in $out/lib. + ]; + + meta = with lib; { + homepage = "http://www.swamiproject.org/"; + description = "MIDI instrument patch files support library"; + license = licenses.lgpl21; + maintainers = with maintainers; [ orivej ]; + platforms = platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/audio/libkeyfinder/default.nix b/nixpkgs/pkgs/development/libraries/audio/libkeyfinder/default.nix new file mode 100644 index 000000000000..cb34f24ced8d --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/audio/libkeyfinder/default.nix @@ -0,0 +1,31 @@ +{ lib, stdenv, fetchFromGitHub, cmake, fftw, catch2 }: + +stdenv.mkDerivation rec { + pname = "libkeyfinder"; + version = "2.2.6"; + + src = fetchFromGitHub { + owner = "mixxxdj"; + repo = "libkeyfinder"; + rev = "v${version}"; + sha256 = "sha256-7w/Wc9ncLinbnM2q3yv5DBtFoJFAM2e9xAUTsqvE9mg="; + }; + + # needed for finding libkeyfinder.so to link it into keyfinder-tests executable + cmakeFlags = [ "-DCMAKE_SKIP_BUILD_RPATH=OFF" ]; + + nativeBuildInputs = [ cmake ]; + + buildInputs = [ fftw ]; + + checkInputs = [ catch2 ]; + + doCheck = true; + + meta = with lib; { + description = "Musical key detection for digital audio (C++ library)"; + homepage = "https://mixxxdj.github.io/libkeyfinder/"; + license = licenses.gpl3Plus; + platforms = platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/audio/libmysofa/default.nix b/nixpkgs/pkgs/development/libraries/audio/libmysofa/default.nix new file mode 100644 index 000000000000..5626c5fa8f8d --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/audio/libmysofa/default.nix @@ -0,0 +1,26 @@ +{ lib, stdenv, fetchFromGitHub, cmake, zlib }: + +stdenv.mkDerivation rec { + pname = "libmysofa"; + version = "1.2.1"; + + src = fetchFromGitHub { + owner = "hoene"; + repo = "libmysofa"; + rev = "v${version}"; + sha256 = "sha256-SCyeicZ+JkJU1x2X3efOvxUXT2qF2IiUsj+anLg5Lsg="; + }; + + nativeBuildInputs = [ cmake ]; + buildInputs = [ zlib ]; + + cmakeFlags = [ "-DBUILD_TESTS=OFF" "-DCODE_COVERAGE=OFF" ]; + + meta = with lib; { + description = "Reader for AES SOFA files to get better HRTFs"; + homepage = "https://github.com/hoene/libmysofa"; + license = licenses.bsd3; + platforms = platforms.all; + maintainers = with maintainers; [ jfrankenau ]; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/audio/libsmf/default.nix b/nixpkgs/pkgs/development/libraries/audio/libsmf/default.nix new file mode 100644 index 000000000000..b3e3a34973c0 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/audio/libsmf/default.nix @@ -0,0 +1,24 @@ +{ lib, stdenv, fetchFromGitHub, autoreconfHook, glib, pkg-config }: + +stdenv.mkDerivation rec { + version = "1.3"; + pname = "libsmf"; + + src = fetchFromGitHub { + owner = "stump"; + repo = "libsmf"; + rev = "libsmf-${version}"; + sha256 = "sha256-OJXJkXvbM2GQNInZXU2ldObquKHhqkdu1zqUDnVZN0Y="; + }; + + nativeBuildInputs = [ autoreconfHook pkg-config ]; + buildInputs = [ glib ]; + + meta = with lib; { + description = "A C library for reading and writing Standard MIDI Files"; + homepage = "https://github.com/stump/libsmf"; + license = licenses.bsd2; + maintainers = [ maintainers.goibhniu ]; + platforms = platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/audio/lilv/default.nix b/nixpkgs/pkgs/development/libraries/audio/lilv/default.nix new file mode 100644 index 000000000000..a29fda0ec2b2 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/audio/lilv/default.nix @@ -0,0 +1,35 @@ +{ lib, stdenv, fetchurl, lv2, pkg-config, python3, serd, sord, sratom, wafHook + +# test derivations +, pipewire +}: + +stdenv.mkDerivation rec { + pname = "lilv"; + version = "0.24.12"; + + outputs = [ "out" "dev" ]; + + src = fetchurl { + url = "https://download.drobilla.net/${pname}-${version}.tar.bz2"; + sha256 = "sha256-JqN3kIkMnB+DggO0f1sjIDNP6SwCpNJuu+Jmnb12kGE="; + }; + + patches = [ ./lilv-pkgconfig.patch ]; + + nativeBuildInputs = [ pkg-config python3 wafHook ]; + buildInputs = [ serd sord sratom ]; + propagatedBuildInputs = [ lv2 ]; + + passthru.tests = { + inherit pipewire; + }; + + meta = with lib; { + homepage = "http://drobilla.net/software/lilv"; + description = "A C library to make the use of LV2 plugins"; + license = licenses.mit; + maintainers = [ maintainers.goibhniu ]; + platforms = platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/audio/lilv/lilv-pkgconfig.patch b/nixpkgs/pkgs/development/libraries/audio/lilv/lilv-pkgconfig.patch new file mode 100644 index 000000000000..a5a8c6007e43 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/audio/lilv/lilv-pkgconfig.patch @@ -0,0 +1,6 @@ +--- a/lilv.pc.in ++++ b/lilv.pc.in +@@ -9 +9,2 @@ Description: Simple C library for hosting LV2 plugins +-Requires: @LILV_PKG_DEPS@ ++Requires: lv2 ++Requires.private: @LILV_PKG_DEPS@ diff --git a/nixpkgs/pkgs/development/libraries/audio/lv2/default.nix b/nixpkgs/pkgs/development/libraries/audio/lv2/default.nix new file mode 100644 index 000000000000..d0ef2e65c598 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/audio/lv2/default.nix @@ -0,0 +1,50 @@ +{ stdenv +, lib +, fetchurl +, libsndfile +, pkg-config +, python3 +, wafHook +, pipewire +}: + +stdenv.mkDerivation rec { + pname = "lv2"; + version = "1.18.2"; + + outputs = [ "out" "dev" ]; + + src = fetchurl { + url = "https://lv2plug.in/spec/${pname}-${version}.tar.bz2"; + sha256 = "sha256-TokfvHRMBYVb6136gugisUkX3Wbpj4K4Iw29HHqy4F4="; + }; + + nativeBuildInputs = [ + pkg-config + wafHook + ]; + + buildInputs = [ + libsndfile + python3 + ]; + + wafConfigureFlags = [ + "--includedir=${placeholder "dev"}/include" + "--bindir=${placeholder "dev"}/bin" + ] ++ lib.optionals stdenv.isDarwin [ + "--lv2dir=${placeholder "out"}/lib/lv2" + ]; + + passthru.tests = { + inherit pipewire; + }; + + meta = with lib; { + homepage = "https://lv2plug.in"; + description = "A plugin standard for audio systems"; + license = licenses.mit; + maintainers = with maintainers; [ goibhniu ]; + platforms = platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/audio/lvtk/default.nix b/nixpkgs/pkgs/development/libraries/audio/lvtk/default.nix new file mode 100644 index 000000000000..414634f07070 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/audio/lvtk/default.nix @@ -0,0 +1,36 @@ +{ lib, stdenv, fetchFromGitHub, boost, gtkmm2, lv2, pkg-config, python2, wafHook }: + +stdenv.mkDerivation rec { + pname = "lvtk"; + version = "1.2.0"; + + src = fetchFromGitHub { + owner = "lvtk"; + repo = "lvtk"; + rev = version; + sha256 = "sha256-6IoyhBig3Nvc4Y8F0w8b1up6sn8O2RmoUVaBQ//+Aaw="; + }; + + nativeBuildInputs = [ pkg-config python2 wafHook ]; + buildInputs = [ boost gtkmm2 lv2 ]; + + enableParallelBuilding = true; + + # Fix including the boost libraries during linking + postPatch = '' + sed -i '/target[ ]*= "ttl2c"/ ilib=["boost_system"],' tools/wscript_build + ''; + + wafConfigureFlags = [ + "--boost-includes=${boost.dev}/include" + "--boost-libs=${boost.out}/lib" + ]; + + meta = with lib; { + description = "A set C++ wrappers around the LV2 C API"; + homepage = "https://lvtk.org/"; + license = licenses.gpl3; + maintainers = [ maintainers.goibhniu ]; + platforms = platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/audio/mbelib/default.nix b/nixpkgs/pkgs/development/libraries/audio/mbelib/default.nix new file mode 100644 index 000000000000..dc01027c4693 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/audio/mbelib/default.nix @@ -0,0 +1,29 @@ +{ lib, stdenv, fetchFromGitHub, cmake }: + +stdenv.mkDerivation rec { + pname = "mbelib"; + version = "1.3.0"; + + src = fetchFromGitHub { + owner = "szechyjs"; + repo = "mbelib"; + rev = "v${version}"; + sha256 = "0v6b7nf8fgxy7vzgcwffqyql5zhldrz30c88k1ylbjp78hwh4rif"; + }; + + nativeBuildInputs = [ cmake ]; + + doCheck = true; + preCheck = '' + export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}$PWD + export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH''${DYLD_LIBRARY_PATH:+:}$PWD + ''; + + meta = with lib; { + description = "P25 Phase 1 and ProVoice vocoder"; + homepage = "https://github.com/szechyjs/mbelib"; + license = licenses.isc; + platforms = platforms.unix; + maintainers = with maintainers; [ andrew-d ]; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/audio/ntk/default.nix b/nixpkgs/pkgs/development/libraries/audio/ntk/default.nix new file mode 100644 index 000000000000..d101e2a960c6 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/audio/ntk/default.nix @@ -0,0 +1,26 @@ +{ lib, stdenv, fetchFromGitHub, cairo, libjpeg, libXft, pkg-config, python3, wafHook }: + +stdenv.mkDerivation rec { + pname = "ntk"; + version = "1.3.1001"; + src = fetchFromGitHub { + owner = "linuxaudio"; + repo = "ntk"; + rev = "v${version}"; + sha256 = "sha256-NyEdg6e+9CI9V+TIgdpPyH1ei+Vq8pUxD3wPzWY5fEU="; + }; + + nativeBuildInputs = [ pkg-config wafHook ]; + buildInputs = [ + cairo libjpeg libXft python3 + ]; + + meta = { + description = "Fork of FLTK 1.3.0 with additional functionality"; + version = version; + homepage = "http://non.tuxfamily.org/"; + license = lib.licenses.lgpl21; + maintainers = with lib.maintainers; [ magnetophon nico202 ]; + platforms = lib.platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/audio/qm-dsp/default.nix b/nixpkgs/pkgs/development/libraries/audio/qm-dsp/default.nix new file mode 100644 index 000000000000..a9163a257764 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/audio/qm-dsp/default.nix @@ -0,0 +1,53 @@ +{ lib, stdenv +, fetchFromGitHub +, fetchpatch +, kissfft +}: + +stdenv.mkDerivation rec { + pname = "qm-dsp"; + version = "1.7.1"; + + src = fetchFromGitHub { + owner = "c4dm"; + repo = pname; + rev = "v${version}"; + sha256 = "1vkb1xr2hjcaw88gig7rknlwsx01lm0w94d2z0rk5vz9ih4fslvv"; + }; + + patches = [ + # Make installable + (fetchpatch { + url = "https://src.fedoraproject.org/rpms/qm-dsp/raw/6eb385e2f970c4150f9c8eba73b558318475ed15/f/qm-dsp-install.patch"; + sha256 = "071g30p17ya0pknzqa950pb93vrgp2024ray8axn22c44gvy147c"; + }) + (fetchpatch { + url = "https://src.fedoraproject.org/rpms/qm-dsp/raw/6eb385e2f970c4150f9c8eba73b558318475ed15/f/qm-dsp-flags.patch"; + sha256 = "127n6j5bsp94kf2m1zqfvkf4iqk1h5f7w778bk7w02vi45nm4x6q"; + postFetch = '' + sed -i 's~/Makefile~/build/linux/Makefile.linux32~g' "$out" + ''; + }) + ]; + + buildInputs = [ + kissfft + ]; + + makefile = "build/linux/Makefile.linux32"; + + makeFlags = [ + "PREFIX=${placeholder "out"}" + "LIBDIR=${placeholder "out"}/lib" + ]; + + NIX_CFLAGS_COMPILE = "-I${kissfft}/include/kissfft"; + + meta = with lib; { + description = "A C++ library of functions for DSP and Music Informatics purposes"; + homepage = "https://code.soundsoftware.ac.uk/projects/qm-dsp"; + license = licenses.gpl2Plus; + maintainers = [ maintainers.goibhniu ]; + platforms = platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/audio/raul/default.nix b/nixpkgs/pkgs/development/libraries/audio/raul/default.nix new file mode 100644 index 000000000000..c200d4ab79c5 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/audio/raul/default.nix @@ -0,0 +1,27 @@ +{ lib, stdenv, fetchgit, boost, gtk2, pkg-config, python3, wafHook }: + +stdenv.mkDerivation rec { + pname = "raul"; + version = "unstable-2019-12-09"; + name = "${pname}-${version}"; + + src = fetchgit { + url = "https://gitlab.com/drobilla/raul.git"; + fetchSubmodules = true; + rev = "e87bb398f025912fb989a09f1450b838b251aea1"; + sha256 = "1z37jb6ghc13b8nv8a8hcg669gl8vh4ni9djvfgga9vcz8rmcg8l"; + }; + + nativeBuildInputs = [ pkg-config wafHook python3 ]; + buildInputs = [ boost gtk2 ]; + + strictDeps = true; + + meta = with lib; { + description = "A C++ utility library primarily aimed at audio/musical applications"; + homepage = "http://drobilla.net/software/raul"; + license = licenses.gpl3; + maintainers = [ maintainers.goibhniu ]; + platforms = platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/audio/roc-toolkit/0001-Remove-deprecated-scons-call.patch b/nixpkgs/pkgs/development/libraries/audio/roc-toolkit/0001-Remove-deprecated-scons-call.patch new file mode 100644 index 000000000000..e13dda549705 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/audio/roc-toolkit/0001-Remove-deprecated-scons-call.patch @@ -0,0 +1,24 @@ +From abdfbb94df98fe88be4dd92ca587500126558411 Mon Sep 17 00:00:00 2001 +From: Victor Gaydov <victor@enise.org> +Date: Sun, 26 Jul 2020 11:54:52 +0300 +Subject: [PATCH] Remove deprecated scons call + +--- + SConstruct | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/SConstruct b/SConstruct +index 407025d8..04afa91f 100644 +--- a/SConstruct ++++ b/SConstruct +@@ -49,7 +49,6 @@ env = Environment(ENV=os.environ, tools=[ + # performance tuning + env.Decider('MD5-timestamp') + env.SetOption('implicit_cache', 1) +-env.SourceCode('.', None) + + # provide absolute path to force single sconsign file + # per-directory sconsign files seems to be buggy with generated sources +-- +2.34.1 + diff --git a/nixpkgs/pkgs/development/libraries/audio/roc-toolkit/0002-Fix-compatibility-with-new-SCons.patch b/nixpkgs/pkgs/development/libraries/audio/roc-toolkit/0002-Fix-compatibility-with-new-SCons.patch new file mode 100644 index 000000000000..097f1b3ff479 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/audio/roc-toolkit/0002-Fix-compatibility-with-new-SCons.patch @@ -0,0 +1,31 @@ +From 15b37bb12a362c7889ac431eca4a47d6b2bdb97c Mon Sep 17 00:00:00 2001 +From: Victor Gaydov <victor@enise.org> +Date: Sat, 5 Dec 2020 18:38:36 +0300 +Subject: [PATCH] Fix compatibility with new SCons + +--- + site_scons/site_tools/roc/config.py | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/site_scons/site_tools/roc/config.py b/site_scons/site_tools/roc/config.py +index b42b3adb..03b76be7 100644 +--- a/site_scons/site_tools/roc/config.py ++++ b/site_scons/site_tools/roc/config.py +@@ -13,7 +13,13 @@ def _run_prog(context, src, suffix): + # RunProg may incorrectly use cached results from a previous run saved for + # different file contents but the same invocation number. To prevent this, we + # monkey patch its global counter with a hashsum of the file contents. +- SCons.SConf._ac_build_counter = int(hashlib.md5(src.encode()).hexdigest(), 16) ++ # The workaround is needed only for older versions of SCons, where ++ # _ac_build_counter was an integer. ++ try: ++ if type(SCons.SConf._ac_build_counter) is int: ++ SCons.SConf._ac_build_counter = int(hashlib.md5(src.encode()).hexdigest(), 16) ++ except: ++ pass + return context.RunProg(src, suffix) + + def CheckLibWithHeaderExt(context, libs, headers, language, expr='1', run=True): +-- +2.34.1 + diff --git a/nixpkgs/pkgs/development/libraries/audio/roc-toolkit/default.nix b/nixpkgs/pkgs/development/libraries/audio/roc-toolkit/default.nix new file mode 100644 index 000000000000..98c088ed5495 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/audio/roc-toolkit/default.nix @@ -0,0 +1,72 @@ +{ stdenv, + lib, + fetchFromGitHub, + scons, + ragel, + gengetopt, + pkg-config, + libuv, + openfecSupport ? true, + openfec, + libunwindSupport ? true, + libunwind, + pulseaudioSupport ? true, + libpulseaudio +}: + +stdenv.mkDerivation rec { + pname = "roc-toolkit"; + version = "0.1.5"; + + src = fetchFromGitHub { + owner = "roc-streaming"; + repo = "roc-toolkit"; + rev = "v${version}"; + sha256 = "sha256:1pld340zfch4p3qaf5anrspq7vmxrgf9ddsdsq92pk49axaaz19w"; + }; + + nativeBuildInputs = [ + scons + ragel + gengetopt + pkg-config + ]; + + buildInputs = [ + libuv + libunwind + openfec + libpulseaudio + ]; + + sconsFlags = + [ "--build=${stdenv.buildPlatform.config}" + "--host=${stdenv.hostPlatform.config}" + "--prefix=${placeholder "out"}" + "--disable-sox" + "--disable-doc" + "--disable-tests" ] ++ + lib.optional (!libunwindSupport) "--disable-libunwind" ++ + lib.optional (!pulseaudioSupport) "--disable-pulseaudio" ++ + (if (!openfecSupport) + then ["--disable-openfec"] + else [ "--with-libraries=${openfec}/lib" + "--with-openfec-includes=${openfec.dev}/include" ]); + + prePatch = lib.optionalString stdenv.isAarch64 + "sed -i 's/c++98/c++11/g' SConstruct"; + + # TODO: Remove these patches in the next version. + patches = [ + ./0001-Remove-deprecated-scons-call.patch + ./0002-Fix-compatibility-with-new-SCons.patch + ]; + + meta = with lib; { + description = "Roc is a toolkit for real-time audio streaming over the network"; + homepage = "https://github.com/roc-streaming/roc-toolkit"; + license = licenses.mpl20; + maintainers = with maintainers; [ bgamari ]; + platforms = platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/audio/rtaudio/default.nix b/nixpkgs/pkgs/development/libraries/audio/rtaudio/default.nix new file mode 100644 index 000000000000..11305b3735be --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/audio/rtaudio/default.nix @@ -0,0 +1,49 @@ +{ stdenv +, lib +, config +, fetchFromGitHub +, cmake +, pkg-config +, alsaSupport ? stdenv.hostPlatform.isLinux +, alsa-lib +, pulseaudioSupport ? config.pulseaudio or stdenv.hostPlatform.isLinux +, libpulseaudio +, jackSupport ? true +, jack +, coreaudioSupport ? stdenv.hostPlatform.isDarwin +, CoreAudio +}: + +stdenv.mkDerivation rec { + pname = "rtaudio"; + version = "5.2.0"; + + src = fetchFromGitHub { + owner = "thestk"; + repo = "rtaudio"; + rev = version; + sha256 = "0xvahlfj3ysgsjsp53q81hayzw7f99n1g214gh7dwdr52kv2l987"; + }; + + nativeBuildInputs = [ cmake pkg-config ]; + + buildInputs = lib.optional alsaSupport alsa-lib + ++ lib.optional pulseaudioSupport libpulseaudio + ++ lib.optional jackSupport jack + ++ lib.optional coreaudioSupport CoreAudio; + + cmakeFlags = [ + "-DRTAUDIO_API_ALSA=${if alsaSupport then "ON" else "OFF"}" + "-DRTAUDIO_API_PULSE=${if pulseaudioSupport then "ON" else "OFF"}" + "-DRTAUDIO_API_JACK=${if jackSupport then "ON" else "OFF"}" + "-DRTAUDIO_API_CORE=${if coreaudioSupport then "ON" else "OFF"}" + ]; + + meta = with lib; { + description = "A set of C++ classes that provide a cross platform API for realtime audio input/output"; + homepage = "https://www.music.mcgill.ca/~gary/rtaudio/"; + license = licenses.mit; + maintainers = with maintainers; [ magnetophon ]; + platforms = platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/audio/rtmidi/default.nix b/nixpkgs/pkgs/development/libraries/audio/rtmidi/default.nix new file mode 100644 index 000000000000..0780d2978805 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/audio/rtmidi/default.nix @@ -0,0 +1,62 @@ +{ stdenv +, lib +, fetchFromGitHub +, fetchpatch +, cmake +, pkg-config +, alsaSupport ? stdenv.hostPlatform.isLinux +, alsa-lib +, jackSupport ? true +, jack +, coremidiSupport ? stdenv.hostPlatform.isDarwin +, CoreMIDI +, CoreAudio +, CoreServices +}: + +stdenv.mkDerivation rec { + pname = "rtmidi"; + version = "5.0.0"; + + src = fetchFromGitHub { + owner = "thestk"; + repo = "rtmidi"; + rev = version; + sha256 = "1r1sqmdi499zfh6z6kjkab6d4a7kz3il5kkcdfz9saa6ry992211"; + }; + + patches = [ + # Remove when https://github.com/thestk/rtmidi/pull/278 merged + (fetchpatch { + name = "0001-rtmidi-Use-posix-sched_yield-instead-of-pthread_yield.patch"; + url = "https://github.com/thestk/rtmidi/pull/278/commits/cfe34c02112c256235b62b45895fc2c401fd874d.patch"; + sha256 = "0yzq7zbdkl5r4i0r6vy2kq986cqdxz2cpzb7s977mvh09kdikrw1"; + }) + # Remove when https://github.com/thestk/rtmidi/pull/277 merged + (fetchpatch { + name = "0002-rtmidi-include-TargetConditionals.h-on-Apple-platforms.patch"; + url = "https://github.com/thestk/rtmidi/pull/277/commits/9d863beb28f03ec53f3e4c22cc0d3c34a1e1789b.patch"; + sha256 = "1hlrg23c1ycnwdvxpic8wvypiril04rlph0g820qn1naf92imfjg"; + }) + ]; + + nativeBuildInputs = [ cmake pkg-config ]; + + buildInputs = lib.optional alsaSupport alsa-lib + ++ lib.optional jackSupport jack + ++ lib.optionals coremidiSupport [ CoreMIDI CoreAudio CoreServices ]; + + cmakeFlags = [ + "-DRTMIDI_API_ALSA=${if alsaSupport then "ON" else "OFF"}" + "-DRTMIDI_API_JACK=${if jackSupport then "ON" else "OFF"}" + "-DRTMIDI_API_CORE=${if coremidiSupport then "ON" else "OFF"}" + ]; + + meta = with lib; { + description = "A set of C++ classes that provide a cross platform API for realtime MIDI input/output"; + homepage = "https://www.music.mcgill.ca/~gary/rtmidi/"; + license = licenses.mit; + maintainers = with maintainers; [ magnetophon ]; + platforms = platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/audio/rtmidi/macos_include_targetconditionals.patch b/nixpkgs/pkgs/development/libraries/audio/rtmidi/macos_include_targetconditionals.patch new file mode 100644 index 000000000000..58eaf5f490b1 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/audio/rtmidi/macos_include_targetconditionals.patch @@ -0,0 +1,13 @@ +diff -ru a/RtMidi.cpp b/RtMidi.cpp +--- a/RtMidi.cpp 2021-12-23 16:46:33.000000000 -0500 ++++ b/RtMidi.cpp 2021-12-23 16:48:19.000000000 -0500 +@@ -39,6 +39,9 @@ + + #include "RtMidi.h" + #include <sstream> ++#if defined(__APPLE__) ++#include <TargetConditionals.h> ++#endif + + #if defined(__MACOSX_CORE__) + #if TARGET_OS_IPHONE diff --git a/nixpkgs/pkgs/development/libraries/audio/sratom/default.nix b/nixpkgs/pkgs/development/libraries/audio/sratom/default.nix new file mode 100644 index 000000000000..1a40d249fd5e --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/audio/sratom/default.nix @@ -0,0 +1,22 @@ +{ lib, stdenv, fetchurl, lv2, pkg-config, python3, serd, sord, wafHook }: + +stdenv.mkDerivation rec { + pname = "sratom"; + version = "0.6.8"; + + src = fetchurl { + url = "https://download.drobilla.net/${pname}-${version}.tar.bz2"; + sha256 = "sha256-Ossysa3Forf6za3i4IGLzWxx8j+EoevBeBW7eg0tAt8="; + }; + + nativeBuildInputs = [ pkg-config wafHook python3 ]; + buildInputs = [ lv2 serd sord ]; + + meta = with lib; { + homepage = "http://drobilla.net/software/sratom"; + description = "A library for serialising LV2 atoms to/from RDF"; + license = licenses.mit; + maintainers = [ maintainers.goibhniu ]; + platforms = platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/audio/suil/default.nix b/nixpkgs/pkgs/development/libraries/audio/suil/default.nix new file mode 100644 index 000000000000..ac10472e014e --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/audio/suil/default.nix @@ -0,0 +1,36 @@ +{ stdenv, lib, fetchurl, gtk2, lv2, pkg-config, python3, serd, sord, sratom +, wafHook +, withQt4 ? true, qt4 ? null +, withQt5 ? false, qt5 ? null }: + +# I haven't found an XOR operator in nix... +assert withQt4 || withQt5; +assert !(withQt4 && withQt5); + +stdenv.mkDerivation rec { + pname = "suil"; + version = "0.10.6"; + name = "${pname}-qt${if withQt4 then "4" else "5"}-${version}"; + + src = fetchurl { + url = "https://download.drobilla.net/${pname}-${version}.tar.bz2"; + sha256 = "0z4v01pjw4wh65x38w6icn28wdwxz13ayl8hvn4p1g9kmamp1z06"; + }; + + nativeBuildInputs = [ pkg-config wafHook python3 ]; + buildInputs = [ gtk2 lv2 serd sord sratom ] + ++ (lib.optionals withQt4 [ qt4 ]) + ++ (lib.optionals withQt5 (with qt5; [ qtbase qttools ])); + + dontWrapQtApps = true; + + strictDeps = true; + + meta = with lib; { + homepage = "http://drobilla.net/software/suil"; + description = "A lightweight C library for loading and wrapping LV2 plugin UIs"; + license = licenses.mit; + maintainers = with maintainers; [ goibhniu ]; + platforms = platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/audio/vamp-plugin-sdk/default.nix b/nixpkgs/pkgs/development/libraries/audio/vamp-plugin-sdk/default.nix new file mode 100644 index 000000000000..65ce6580dcec --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/audio/vamp-plugin-sdk/default.nix @@ -0,0 +1,33 @@ +# set VAMP_PATH ? +# plugins availible on sourceforge and http://www.vamp-plugins.org/download.html (various licenses) + +{ lib, stdenv, fetchFromGitHub, pkg-config, libsndfile }: + +stdenv.mkDerivation rec { + pname = "vamp-plugin-sdk"; + version = "2.10"; + + src = fetchFromGitHub { + owner = "c4dm"; + repo = "vamp-plugin-sdk"; + rev = "vamp-plugin-sdk-v${version}"; + sha256 = "1lhmskcyk7qqfikmasiw7wjry74gc8g5q6a3j1iya84yd7ll0cz6"; + }; + + nativeBuildInputs = [ pkg-config ]; + buildInputs = [ libsndfile ]; + + enableParallelBuilding = true; + makeFlags = [ + "AR:=$(AR)" + "RANLIB:=$(RANLIB)" + ] ++ lib.optional (stdenv.buildPlatform != stdenv.hostPlatform) "-o test"; + + meta = with lib; { + description = "Audio processing plugin system for plugins that extract descriptive information from audio data"; + homepage = "https://vamp-plugins.org/"; + license = licenses.bsd3; + maintainers = [ maintainers.goibhniu maintainers.marcweber ]; + platforms = platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/audio/zita-alsa-pcmi/default.nix b/nixpkgs/pkgs/development/libraries/audio/zita-alsa-pcmi/default.nix new file mode 100644 index 000000000000..3a1118c0d81b --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/audio/zita-alsa-pcmi/default.nix @@ -0,0 +1,64 @@ +{ lib, stdenv, fetchurl , alsa-lib, }: + +stdenv.mkDerivation rec { + pname = "zita-alsa-pcmi"; + version = "0.4.0"; + src = fetchurl { + url = "http://kokkinizita.linuxaudio.org/linuxaudio/downloads/${pname}-${version}.tar.bz2"; + sha256 = "sha256-vYyfNg37VB+2DkinE7rx4i1BssdMGaD+ny005y9Q8cU="; + }; + + buildInputs = [ alsa-lib ]; + + buildPhase = '' + cd source + make PREFIX="$out" + + # create lib link for building apps + ln -s libzita-alsa-pcmi.so.$version libzita-alsa-pcmi.so + + # apps + cd ../apps + CXXFLAGS+=" -I../source" \ + LDFLAGS+=" -L../source" \ + make PREFIX="$out" + ''; + + installPhase = '' + mkdir "$out" + mkdir "$out/lib" + mkdir "$out/include" + mkdir "$out/bin" + + cd ../source + + # source + install -Dm755 libzita-alsa-pcmi.so.$version \ + "$out/lib/libzita-alsa-pcmi.so.$version" + + # link + ln -s libzita-alsa-pcmi.so.$version \ + "$out/lib/libzita-alsa-pcmi.so" + ln -s libzita-alsa-pcmi.so.$version \ + "$out/lib/libzita-alsa-pcmi.so.0" + + # header + install -Dm644 zita-alsa-pcmi.h \ + "$out/include/zita-alsa-pcmi.h" + + # apps + install -Dm755 ../apps/alsa_delay \ + "$out/bin/alsa_delay" + install -Dm755 ../apps/alsa_loopback \ + "$out/bin/alsa_loopback" + ''; + + meta = { + description = "The successor of clalsadrv, provides easy access to ALSA PCM devices"; + version = version; + homepage = "http://kokkinizita.linuxaudio.org/linuxaudio/downloads/index.html"; + license = lib.licenses.gpl3; + maintainers = [ lib.maintainers.magnetophon ]; + platforms = lib.platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/audio/zita-convolver/default.nix b/nixpkgs/pkgs/development/libraries/audio/zita-convolver/default.nix new file mode 100644 index 000000000000..3b77bf549ca6 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/audio/zita-convolver/default.nix @@ -0,0 +1,36 @@ +{ lib, stdenv, fetchurl, fftwFloat }: + +stdenv.mkDerivation rec { + pname = "zita-convolver"; + version = "4.0.3"; + src = fetchurl { + url = "http://kokkinizita.linuxaudio.org/linuxaudio/downloads/${pname}-${version}.tar.bz2"; + sha256 = "0prji66p86z2bzminywkwchr5bfgxcg2i8y803pydd1hzf2198cs"; + }; + + buildInputs = [ fftwFloat ]; + + patchPhase = '' + cd source + sed -e "s@ldconfig@@" -i Makefile + ''; + + makeFlags = [ + "PREFIX=$(out)" + "SUFFIX=" + ]; + + postInstall = '' + # create lib link for building apps + ln -s $out/lib/libzita-convolver.so.${version} $out/lib/libzita-convolver.so.${lib.versions.major version} + ''; + + meta = { + description = "Convolution library by Fons Adriaensen"; + version = version; + homepage = "http://kokkinizita.linuxaudio.org/linuxaudio/downloads/index.html"; + license = lib.licenses.gpl2; + maintainers = [ lib.maintainers.magnetophon ]; + platforms = lib.platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/audio/zita-resampler/default.nix b/nixpkgs/pkgs/development/libraries/audio/zita-resampler/default.nix new file mode 100644 index 000000000000..075ce33ef9e2 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/audio/zita-resampler/default.nix @@ -0,0 +1,38 @@ +{ lib, stdenv, fetchurl }: + +stdenv.mkDerivation rec { + pname = "zita-resampler"; + version = "1.8.0"; + + src = fetchurl { + url = "http://kokkinizita.linuxaudio.org/linuxaudio/downloads/${pname}-${version}.tar.bz2"; + sha256 = "sha256-5XRPI8VN0Vs/eDpoe9h57uKmkKRUWhW0nEzwN6pGSqI="; + }; + + makeFlags = [ + "PREFIX=$(out)" + "SUFFIX=" + ]; + + postPatch = '' + cd source + substituteInPlace Makefile \ + --replace 'ldconfig' "" + '' + lib.optionalString (!stdenv.targetPlatform.isx86_64) '' + substituteInPlace Makefile \ + --replace '-DENABLE_SSE2' "" + ''; + + fixupPhase = '' + ln -s $out/lib/libzita-resampler.so.$version $out/lib/libzita-resampler.so.1 + ''; + + meta = { + description = "Resample library by Fons Adriaensen"; + version = version; + homepage = "http://kokkinizita.linuxaudio.org/linuxaudio/downloads/index.html"; + license = lib.licenses.gpl2; + maintainers = [ lib.maintainers.magnetophon ]; + platforms = lib.platforms.linux; + }; +} |