alsaequal: init at 0.6

Co-Authored-By: Doron Behar <doron.behar@gmail.com>

ymeister 5de1b169 c5e223e1

+91
+21
pkgs/tools/audio/alsaequal/caps_9.x.patch
··· 1 + --- ./ctl_equal.c 2 + +++ ./ctl_equal.c 3 + @@ -167,7 +167,7 @@ 4 + snd_ctl_equal_t *equal; 5 + const char *controls = ".alsaequal.bin"; 6 + const char *library = "/usr/lib/ladspa/caps.so"; 7 + - const char *module = "Eq"; 8 + + const char *module = "Eq10"; 9 + long channels = 2; 10 + const char *sufix = " Playback Volume"; 11 + int err, i, index; 12 + --- ./pcm_equal.c 13 + +++ ./pcm_equal.c 14 + @@ -151,7 +151,7 @@ 15 + snd_config_t *sconf = NULL; 16 + const char *controls = ".alsaequal.bin"; 17 + const char *library = "/usr/lib/ladspa/caps.so"; 18 + - const char *module = "Eq"; 19 + + const char *module = "Eq10"; 20 + long channels = 2; 21 + int err;
+42
pkgs/tools/audio/alsaequal/default.nix
··· 1 + { stdenv, fetchurl 2 + , alsaLib, caps 3 + }: 4 + 5 + stdenv.mkDerivation rec { 6 + name = "alsaequal"; 7 + version = "0.6"; 8 + 9 + src = fetchurl { 10 + url = "https://thedigitalmachine.net/tools/alsaequal-${version}.tar.bz2"; 11 + sha256 = "1w3g9q5z3nrn3mwdhaq6zsg0jila8d102dgwgrhj9vfx58apsvli"; 12 + }; 13 + 14 + buildInputs = [ alsaLib ]; 15 + 16 + makeFlags = [ "DESTDIR=$(out)" ]; 17 + 18 + # Borrowed from Arch Linux's AUR 19 + patches = [ 20 + # Adds executable permissions to resulting libraries 21 + # and changes their destination directory from "usr/lib/alsa-lib" to "lib/alsa-lib" to better align with nixpkgs filesystem hierarchy. 22 + ./makefile.patch 23 + # Fixes control port check, which resulted in false error. 24 + ./false_error.patch 25 + # Fixes name change of an "Eq" to "Eq10" method in version 9 of caps library. 26 + ./caps_9.x.patch 27 + ]; 28 + 29 + postPatch = '' 30 + sed -i 's#/usr/lib/ladspa/caps\.so#${caps}/lib/ladspa/caps\.so#g' ctl_equal.c pcm_equal.c 31 + ''; 32 + 33 + preInstall = '' 34 + mkdir -p "$out/lib/alsa-lib" 35 + ''; 36 + 37 + meta = with stdenv.lib; { 38 + description = "Real-time adjustable equalizer plugin for ALSA"; 39 + homepage = "https://thedigitalmachine.net/alsaequal.html"; 40 + license = licenses.gpl2; 41 + }; 42 + }
+13
pkgs/tools/audio/alsaequal/false_error.patch
··· 1 + --- ./ctl_equal.c 2 + +++ ./ctl_equal.c 3 + @@ -263,8 +263,8 @@ 4 + for(i = 0; i < equal->num_input_controls; i++) { 5 + if(equal->control_data->control[i].type == LADSPA_CNTRL_INPUT) { 6 + index = equal->control_data->control[i].index; 7 + - if(equal->klass->PortDescriptors[index] != 8 + - (LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL)) { 9 + + if(equal->klass->PortDescriptors[index] & 10 + + (LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL) == 0) { 11 + SNDERR("Problem with control file %s, %d.", controls, index); 12 + return -1; 13 + }
+13
pkgs/tools/audio/alsaequal/makefile.patch
··· 1 + --- ./Makefile 2 + +++ ./Makefile 3 + @@ -45,8 +45,8 @@ 4 + 5 + install: all 6 + @echo Installing... 7 + - $(Q)install -m 644 $(SND_PCM_BIN) ${DESTDIR}/usr/lib/alsa-lib/ 8 + - $(Q)install -m 644 $(SND_CTL_BIN) ${DESTDIR}/usr/lib/alsa-lib/ 9 + + $(Q)install -m 755 $(SND_PCM_BIN) ${DESTDIR}/lib/alsa-lib/ 10 + + $(Q)install -m 755 $(SND_CTL_BIN) ${DESTDIR}/lib/alsa-lib/ 11 + 12 + uninstall: 13 + @echo Un-installing...
+2
pkgs/top-level/all-packages.nix
··· 521 521 acoustidFingerprinter = callPackage ../tools/audio/acoustid-fingerprinter { 522 522 ffmpeg = ffmpeg_2; 523 523 }; 524 + 525 + alsaequal = callPackage ../tools/audio/alsaequal { }; 524 526 525 527 acpica-tools = callPackage ../tools/system/acpica-tools { }; 526 528