diff options
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/audio')
31 files changed, 1277 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/audio/cubeb/default.nix b/nixpkgs/pkgs/development/libraries/audio/cubeb/default.nix new file mode 100644 index 000000000000..baad8a1efd64 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/audio/cubeb/default.nix @@ -0,0 +1,68 @@ +{ lib, stdenv, fetchFromGitHub +, cmake +, pkg-config +, alsa-lib +, jack2 +, libpulseaudio +, sndio +, speexdsp +, AudioUnit +, CoreAudio +, CoreServices +, lazyLoad ? !stdenv.isDarwin +}: + +assert lib.assertMsg (stdenv.isDarwin -> !lazyLoad) "cubeb: lazyLoad is inert on Darwin"; + +let + backendLibs = [ + alsa-lib + jack2 + libpulseaudio + sndio + ]; + +in stdenv.mkDerivation { + pname = "cubeb"; + version = "unstable-2022-10-18"; + + src = fetchFromGitHub { + owner = "mozilla"; + repo = "cubeb"; + rev = "27d2a102b0b75d9e49d43bc1ea516233fb87d778"; + hash = "sha256-q+uz1dGU4LdlPogL1nwCR/KuOX4Oy3HhMdA6aJylBRk="; + }; + + nativeBuildInputs = [ + cmake + pkg-config + ]; + + buildInputs = [ speexdsp ] ++ ( + if stdenv.isDarwin then [ AudioUnit CoreAudio CoreServices ] + else backendLibs + ); + + cmakeFlags = [ + "-DBUILD_SHARED_LIBS=ON" + "-DBUILD_TESTS=OFF" # tests require an audio server + "-DBUNDLE_SPEEX=OFF" + "-DUSE_SANITIZERS=OFF" + + # Whether to lazily load libraries with dlopen() + "-DLAZY_LOAD_LIBS=${if lazyLoad then "ON" else "OFF"}" + ]; + + passthru = { + # For downstream users when lazyLoad is true + backendLibs = lib.optionals lazyLoad backendLibs; + }; + + meta = with lib; { + description = "Cross platform audio library"; + homepage = "https://github.com/mozilla/cubeb"; + license = licenses.isc; + platforms = platforms.linux ++ platforms.darwin; + maintainers = with maintainers; [ zhaofengli ]; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/audio/game-music-emu/default.nix b/nixpkgs/pkgs/development/libraries/audio/game-music-emu/default.nix new file mode 100644 index 000000000000..a10aace767be --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/audio/game-music-emu/default.nix @@ -0,0 +1,29 @@ +{ lib, stdenv, fetchurl, cmake, removeReferencesTo }: + +stdenv.mkDerivation rec { + version = "0.6.3"; + pname = "game-music-emu"; + + src = fetchurl { + url = "https://bitbucket.org/mpyne/game-music-emu/downloads/${pname}-${version}.tar.xz"; + sha256 = "07857vdkak306d9s5g6fhmjyxk7vijzjhkmqb15s7ihfxx9lx8xb"; + }; + cmakeFlags = lib.optionals (stdenv.isDarwin || stdenv.hostPlatform.isMusl) [ "-DENABLE_UBSAN=OFF" ]; + nativeBuildInputs = [ cmake removeReferencesTo ]; + + # 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)" + ''; + + meta = with lib; { + homepage = "https://bitbucket.org/mpyne/game-music-emu/wiki/Home"; + description = "A collection of video game music file emulators"; + license = licenses.lgpl21Plus; + platforms = platforms.all; + maintainers = with maintainers; [ luc65r lheckemann ]; + }; +} 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..fa390eaaa588 --- /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 = "https://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/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..0742297cb69f --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/audio/libkeyfinder/default.nix @@ -0,0 +1,37 @@ +{ lib, stdenv, fetchpatch, 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="; + }; + + # in main post 2.2.6, see https://github.com/mixxxdj/libkeyfinder/issues/21 + patches = [ + (fetchpatch { + name = "fix-pkg-config"; + url = "https://github.com/mixxxdj/libkeyfinder/commit/4e1a5022d4c91e3ecfe9be5c3ac7cc488093bd2e.patch"; + sha256 = "08llmgp6r11bq5s820j3fs9bgriaibkhq8r3v2av064w66mwp48x"; + }) + ]; + + nativeBuildInputs = [ cmake ]; + + buildInputs = [ fftw ]; + + nativeCheckInputs = [ 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..a5ecbdcfccce --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/audio/libmysofa/default.nix @@ -0,0 +1,28 @@ +{ lib, stdenv, fetchFromGitHub, cmake, zlib }: + +stdenv.mkDerivation rec { + pname = "libmysofa"; + version = "1.3.1"; + + src = fetchFromGitHub { + owner = "hoene"; + repo = "libmysofa"; + rev = "v${version}"; + sha256 = "sha256-QEfkeofsVxB9gyISL/P7bvnbcBuG7Q3A4UoAyQAXxgE="; + }; + + outputs = [ "out" "dev" ]; + + 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/libopenmpt-modplug/default.nix b/nixpkgs/pkgs/development/libraries/audio/libopenmpt-modplug/default.nix new file mode 100644 index 000000000000..8d5ef86a8967 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/audio/libopenmpt-modplug/default.nix @@ -0,0 +1,42 @@ +{ stdenv +, lib +, fetchurl +, autoreconfHook +, pkg-config +, libopenmpt +}: + +stdenv.mkDerivation rec { + pname = "libopenmpt-modplug"; + version = "0.8.9.0-openmpt1"; + + outputs = [ "out" "dev" ]; + + src = fetchurl { + url = "https://lib.openmpt.org/files/libopenmpt-modplug/libopenmpt-modplug-${version}.tar.gz"; + sha256 = "sha256-7M4aDuz9sLWCTKuJwnDc5ZWWKVosF8KwQyFez018T/c="; + }; + + enableParallelBuilding = true; + + nativeBuildInputs = [ + autoreconfHook + pkg-config + ]; + + buildInputs = [ + libopenmpt + ]; + + configureFlags = [ + "--enable-libmodplug" + ]; + + meta = with lib; { + description = "A libmodplug emulation layer based on libopenmpt"; + homepage = "https://lib.openmpt.org/libopenmpt/"; + license = licenses.bsd3; + maintainers = with maintainers; [ OPNA2608 ]; + platforms = platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/audio/libopenmpt/default.nix b/nixpkgs/pkgs/development/libraries/audio/libopenmpt/default.nix new file mode 100644 index 000000000000..bb5a4e0dd53b --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/audio/libopenmpt/default.nix @@ -0,0 +1,70 @@ +{ config +, lib +, stdenv +, fetchurl +, zlib +, pkg-config +, mpg123 +, libogg +, libvorbis +, portaudio +, libsndfile +, flac +, usePulseAudio ? config.pulseaudio or stdenv.isLinux +, libpulseaudio +}: + +stdenv.mkDerivation rec { + pname = "libopenmpt"; + version = "0.7.2"; + + outputs = [ "out" "dev" "bin" ]; + + src = fetchurl { + url = "https://lib.openmpt.org/files/libopenmpt/src/libopenmpt-${version}+release.autotools.tar.gz"; + hash = "sha256-UJFD5aTzsT3Zjq4om/7BtWTt3XG7x8p4ZLgoNeMTMOE="; + }; + + enableParallelBuilding = true; + + nativeBuildInputs = [ + pkg-config + ]; + + buildInputs = [ + zlib + mpg123 + libogg + libvorbis + portaudio + libsndfile + flac + ] ++ lib.optionals usePulseAudio [ + libpulseaudio + ]; + + configureFlags = [ + (lib.strings.withFeature usePulseAudio "pulseaudio") + ]; + + doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform; + + postFixup = '' + moveToOutput share/doc $dev + ''; + + passthru.updateScript = ./update.sh; + + meta = with lib; { + description = "Cross-platform C++ and C library to decode tracked music files into a raw PCM audio stream"; + longDescription = '' + libopenmpt is a cross-platform C++ and C library to decode tracked music files (modules) into a raw PCM audio stream. + openmpt123 is a cross-platform command-line or terminal based module file player. + libopenmpt is based on the player code of the OpenMPT project. + ''; + homepage = "https://lib.openmpt.org/libopenmpt/"; + license = licenses.bsd3; + maintainers = with maintainers; [ OPNA2608 ]; + platforms = platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/audio/libopenmpt/update.sh b/nixpkgs/pkgs/development/libraries/audio/libopenmpt/update.sh new file mode 100755 index 000000000000..2d4e5afac0b7 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/audio/libopenmpt/update.sh @@ -0,0 +1,31 @@ +#!/usr/bin/env nix-shell +#!nix-shell -i bash -p common-updater-scripts curl xmlstarlet + +attr=libopenmpt + +set -eu -o pipefail + +# Get update notifications, remove updates for libopenmpt-modplug, find latest eligible & extract versions +versions="$( + curl -s 'https://lib.openmpt.org/libopenmpt/feed.xml' | + xmlstarlet sel -N atom="http://www.w3.org/2005/Atom" -t -m /atom:feed/atom:entry -v atom:title -n | + grep -v 'libopenmpt-modplug' | head -n1 | + grep -Eo '([0-9][^,\s]+)' | tr '\n' ' ' +)" +echo "Latest $attr versions: $versions" + +# Find a version that is > current version and not a rc +# rc's have different download path and a full release will usually follow shortly +currentVersion="$(nix-instantiate --eval -E "with import ./. {}; $attr.version" | tr -d '"')" +echo "Current $attr version: $currentVersion" +for version in $versions; do + (echo "$version" | grep -q 'rc') && continue + [ "$version" = "$(printf '%s\n%s' "$version" "$currentVersion" | sort -V | head -n1)" ] && continue + + echo "Updating to $version. Please check if other versions qualify for backport to stable!" + update-source-version "$attr" "$version" + exit 0 +done + +echo "No version eligible for bump." +exit 0 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..6737d76538e0 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/audio/libsmf/default.nix @@ -0,0 +1,25 @@ +{ 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 ]; + mainProgram = "smfsh"; + platforms = platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/audio/libspecbleach/default.nix b/nixpkgs/pkgs/development/libraries/audio/libspecbleach/default.nix new file mode 100644 index 000000000000..b1065561e1c6 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/audio/libspecbleach/default.nix @@ -0,0 +1,26 @@ +{ lib, stdenv, fetchFromGitHub, meson, ninja, pkg-config, fftwFloat}: + +stdenv.mkDerivation rec { + pname = "libspecbleach"; + version = "0.1.6"; + + src = fetchFromGitHub { + owner = "lucianodato"; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-Tw5nrGVAeoiMH00efJwcU+QLmKDZZTXHQPSV9x789TM="; + }; + + nativeBuildInputs = [ meson ninja pkg-config ]; + buildInputs = [ + fftwFloat + ]; + + meta = with lib; { + description = "C library for audio noise reduction"; + homepage = "https://github.com/lucianodato/libspecbleach"; + license = licenses.lgpl2; + maintainers = [ maintainers.magnetophon ]; + 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..14b0d4c5e46f --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/audio/lilv/default.nix @@ -0,0 +1,36 @@ +{ 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 ]; + dontAddWafCrossFlags = true; + + 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..d0f85c95a077 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/audio/lv2/default.nix @@ -0,0 +1,66 @@ +{ stdenv +, lib +, fetchurl +, meson +, ninja + +, pipewire +, gitUpdater +}: + +stdenv.mkDerivation rec { + pname = "lv2"; + version = "1.18.10"; + + outputs = [ "out" "dev" ]; + + src = fetchurl { + url = "https://lv2plug.in/spec/${pname}-${version}.tar.xz"; + hash = "sha256-eMUbzyG1Tli7Yymsy7Ta4Dsu15tSD5oB5zS9neUwlT8="; + }; + + strictDeps = true; + + nativeBuildInputs = [ + meson + ninja + ]; + + buildInputs = [ ]; + + mesonFlags = [ + # install validators to $dev + "--bindir=${placeholder "dev"}/bin" + + # These are just example plugins. They pull in outdated gtk-2 + # dependency and many other things. Upstream would like to + # eventually move them of the project: + # https://gitlab.com/lv2/lv2/-/issues/57#note_1096060029 + "-Dplugins=disabled" + # Pulls in spell checkers among other things. + "-Dtests=disabled" + # Avoid heavyweight python dependencies. + "-Ddocs=disabled" + ] ++ lib.optionals stdenv.isDarwin [ + "-Dlv2dir=${placeholder "out"}/lib/lv2" + ]; + + passthru = { + tests = { + inherit pipewire; + }; + updateScript = gitUpdater { + # No nicer place to find latest release. + url = "https://gitlab.com/lv2/lv2.git"; + rev-prefix = "v"; + }; + }; + + 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..9822640f8d67 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/audio/lvtk/default.nix @@ -0,0 +1,42 @@ +{ lib, stdenv, fetchFromGitHub, boost, gtkmm2, lv2, pkg-config, python3, 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 python3 wafHook ]; + buildInputs = [ boost gtkmm2 lv2 ]; + + enableParallelBuilding = true; + + postPatch = '' + # Fix including the boost libraries during linking + sed -i '/target[ ]*= "ttl2c"/ ilib=["boost_system"],' tools/wscript_build + + # don't use bundled waf + rm waf + + # remove (useless) python2 based print + sed -e '/print/d' -i wscript + ''; + + 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..dccb738a30f4 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/audio/mbelib/default.nix @@ -0,0 +1,25 @@ +{ 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; + + 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..59f7d169291b --- /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" + ]; + + env.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/default.nix b/nixpkgs/pkgs/development/libraries/audio/roc-toolkit/default.nix new file mode 100644 index 000000000000..c2cdd5285aa3 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/audio/roc-toolkit/default.nix @@ -0,0 +1,71 @@ +{ stdenv, + lib, + fetchFromGitHub, + scons, + ragel, + gengetopt, + pkg-config, + libuv, + openfecSupport ? true, + openfec, + speexdsp, + libunwindSupport ? true, + libunwind, + pulseaudioSupport ? true, + libpulseaudio, + opensslSupport ? true, + openssl, + soxSupport ? true, + sox +}: + +stdenv.mkDerivation rec { + pname = "roc-toolkit"; + version = "0.2.5"; + + outputs = [ "out" "dev" ]; + + src = fetchFromGitHub { + owner = "roc-streaming"; + repo = "roc-toolkit"; + rev = "v${version}"; + hash = "sha256-vosw4H3YTTCXdDOnQQYRNZgufPo1BxUtfg6jutArzTI="; + }; + + nativeBuildInputs = [ + scons + ragel + gengetopt + pkg-config + ]; + + propagatedBuildInputs = [ + libuv + speexdsp + ] ++ lib.optional openfecSupport openfec + ++ lib.optional libunwindSupport libunwind + ++ lib.optional pulseaudioSupport libpulseaudio + ++ lib.optional opensslSupport openssl + ++ lib.optional soxSupport sox; + + sconsFlags = + [ "--build=${stdenv.buildPlatform.config}" + "--host=${stdenv.hostPlatform.config}" + "--prefix=${placeholder "out"}" ] ++ + lib.optional (!opensslSupport) "--disable-openssl" ++ + lib.optional (!soxSupport) "--disable-sox" ++ + 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" ]); + + 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..45dceb393457 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/audio/sratom/default.nix @@ -0,0 +1,75 @@ +{ lib +, stdenv +, fetchurl +, lv2 +, meson +, ninja +, pkg-config +, serd +, sord +, writeScript +}: + +stdenv.mkDerivation rec { + pname = "sratom"; + version = "0.6.14"; + + outputs = [ "out" "dev" ]; + + src = fetchurl { + url = "https://download.drobilla.net/${pname}-${version}.tar.xz"; + hash = "sha256-mYL69A24Ou3Zs4UOSZ/s1oUri0um3t5RQBNlXP+soeY="; + }; + + strictDeps = true; + + nativeBuildInputs = [ + meson + ninja + pkg-config + ]; + + buildInputs = [ + lv2 + serd + sord + ]; + + postPatch = '' + patchShebangs --build scripts/dox_to_sphinx.py + ''; + + mesonFlags = [ + "-Ddocs=disabled" + ]; + + postFixup = '' + # remove once updated to 0.6.15 or above + for f in $dev/lib/pkgconfig/*; do + echo "Requires: lv2 >= 1.18.4, serd-0 >= 0.30.10, sord-0 >= 0.16.10" >> "$f" + done + ''; + + passthru = { + updateScript = writeScript "update-sratom" '' + #!/usr/bin/env nix-shell + #!nix-shell -i bash -p curl pcre common-updater-scripts + + set -eu -o pipefail + + # Expect the text in format of 'download.drobilla.net/sratom-0.30.16.tar.xz">' + new_version="$(curl -s https://drobilla.net/category/sratom/ | + pcregrep -o1 'download.drobilla.net/sratom-([0-9.]+).tar.xz' | + head -n1)" + update-source-version ${pname} "$new_version" + ''; + }; + + meta = with lib; { + homepage = "https://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..3dc3bb5dacdc --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/audio/suil/default.nix @@ -0,0 +1,30 @@ +{ stdenv, lib, fetchurl, gtk2, lv2, pkg-config, python3, serd, sord, sratom +, wafHook +, withQt5 ? true, qt5 ? null +}: + +stdenv.mkDerivation rec { + pname = "suil"; + version = "0.10.6"; + + 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 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..fc5162b34e8d --- /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.6.1"; + src = fetchurl { + url = "http://kokkinizita.linuxaudio.org/linuxaudio/downloads/${pname}-${version}.tar.bz2"; + sha256 = "sha256-iil6zj16R0Ex7T+jIQacExM3eFtWojfW8WjIXueW1Ww="; + }; + + 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; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/audio/zix/default.nix b/nixpkgs/pkgs/development/libraries/audio/zix/default.nix new file mode 100644 index 000000000000..dcd0b328a052 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/audio/zix/default.nix @@ -0,0 +1,42 @@ +{ lib +, stdenv +, fetchFromGitLab +, meson +, ninja +, pkg-config +}: + +stdenv.mkDerivation rec { + pname = "zix"; + version = "unstable-2023-02-13"; + + src = fetchFromGitLab { + owner = "drobilla"; + repo = pname; + rev = "262d4a1522c38be0588746e874159da5c7bb457d"; + hash = "sha256-3vuefgnirM4ksK3j9sjBHgOmx0JpL+6tCPb69/7jI00="; + }; + + nativeBuildInputs = [ + meson + ninja + pkg-config + ]; + + mesonFlags = [ + "-Dbenchmarks=disabled" + "-Ddocs=disabled" + ]; + + meta = with lib; { + description = "A lightweight C99 portability and data structure library"; + homepage = "https://gitlab.com/drobilla/zix"; + changelog = "https://gitlab.com/drobilla/zix/-/blob/${src.rev}/NEWS"; + license = licenses.isc; + platforms = platforms.unix; + maintainers = with maintainers; [ + yuu + zseri + ]; + }; +} |