From 13bf9925ac22f3755695659ad2ed97e127289a3e Mon Sep 17 00:00:00 2001 From: jopejoe1 Date: Thu, 17 Oct 2024 21:29:59 +0200 Subject: [PATCH 1/2] alsaequal: switch to live src --- pkgs/tools/audio/alsaequal/default.nix | 12 +++++++----- pkgs/tools/audio/alsaequal/makefile.patch | 4 ++-- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/pkgs/tools/audio/alsaequal/default.nix b/pkgs/tools/audio/alsaequal/default.nix index 73b95f9fe7cce..24bef265b24df 100644 --- a/pkgs/tools/audio/alsaequal/default.nix +++ b/pkgs/tools/audio/alsaequal/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl +{ lib, stdenv, fetchFromGitHub , alsa-lib, caps }: @@ -6,9 +6,11 @@ stdenv.mkDerivation rec { pname = "alsaequal"; version = "0.6"; - src = fetchurl { - url = "https://thedigitalmachine.net/tools/alsaequal-${version}.tar.bz2"; - sha256 = "1w3g9q5z3nrn3mwdhaq6zsg0jila8d102dgwgrhj9vfx58apsvli"; + src = fetchFromGitHub { + owner = "bassdr"; + repo = "alsaequal"; + rev = "refs/tags/v${version}"; + hash = "sha256-cCo8qWQv4bQ+RvH43Xbj+Q4qC5DmvracBuzI96EAnhY="; }; buildInputs = [ alsa-lib ]; @@ -36,7 +38,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Real-time adjustable equalizer plugin for ALSA"; - homepage = "https://thedigitalmachine.net/alsaequal.html"; + homepage = "https://github.com/bassdr/alsaequal"; license = licenses.gpl2Plus; maintainers = with maintainers; [ ymeister ]; }; diff --git a/pkgs/tools/audio/alsaequal/makefile.patch b/pkgs/tools/audio/alsaequal/makefile.patch index ee8aa170d60b9..5fd7062d73dea 100644 --- a/pkgs/tools/audio/alsaequal/makefile.patch +++ b/pkgs/tools/audio/alsaequal/makefile.patch @@ -4,8 +4,8 @@ install: all @echo Installing... -- $(Q)install -m 644 $(SND_PCM_BIN) ${DESTDIR}/usr/lib/alsa-lib/ -- $(Q)install -m 644 $(SND_CTL_BIN) ${DESTDIR}/usr/lib/alsa-lib/ +- $(Q)install -m 644 $(SND_PCM_BIN) /usr/lib/alsa-lib/ +- $(Q)install -m 644 $(SND_CTL_BIN) /usr/lib/alsa-lib/ + $(Q)install -m 755 $(SND_PCM_BIN) ${DESTDIR}/lib/alsa-lib/ + $(Q)install -m 755 $(SND_CTL_BIN) ${DESTDIR}/lib/alsa-lib/ From ad9cfe30fa45c414254ee960956babb5bb4905cc Mon Sep 17 00:00:00 2001 From: jopejoe1 Date: Thu, 17 Oct 2024 21:38:09 +0200 Subject: [PATCH 2/2] alsaequal: 0.6 -> 0.7.1 --- pkgs/tools/audio/alsaequal/caps_9.x.patch | 21 -------------------- pkgs/tools/audio/alsaequal/default.nix | 16 +++++++-------- pkgs/tools/audio/alsaequal/false_error.patch | 13 ------------ pkgs/tools/audio/alsaequal/makefile.patch | 10 ++++++---- 4 files changed, 14 insertions(+), 46 deletions(-) delete mode 100644 pkgs/tools/audio/alsaequal/caps_9.x.patch delete mode 100644 pkgs/tools/audio/alsaequal/false_error.patch diff --git a/pkgs/tools/audio/alsaequal/caps_9.x.patch b/pkgs/tools/audio/alsaequal/caps_9.x.patch deleted file mode 100644 index 282e040497474..0000000000000 --- a/pkgs/tools/audio/alsaequal/caps_9.x.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- ./ctl_equal.c -+++ ./ctl_equal.c -@@ -167,7 +167,7 @@ - snd_ctl_equal_t *equal; - const char *controls = ".alsaequal.bin"; - const char *library = "/usr/lib/ladspa/caps.so"; -- const char *module = "Eq"; -+ const char *module = "Eq10"; - long channels = 2; - const char *sufix = " Playback Volume"; - int err, i, index; ---- ./pcm_equal.c -+++ ./pcm_equal.c -@@ -151,7 +151,7 @@ - snd_config_t *sconf = NULL; - const char *controls = ".alsaequal.bin"; - const char *library = "/usr/lib/ladspa/caps.so"; -- const char *module = "Eq"; -+ const char *module = "Eq10"; - long channels = 2; - int err; diff --git a/pkgs/tools/audio/alsaequal/default.nix b/pkgs/tools/audio/alsaequal/default.nix index 24bef265b24df..d35facd6c3d97 100644 --- a/pkgs/tools/audio/alsaequal/default.nix +++ b/pkgs/tools/audio/alsaequal/default.nix @@ -1,19 +1,23 @@ { lib, stdenv, fetchFromGitHub -, alsa-lib, caps +, alsa-lib, caps, + ladspaH }: stdenv.mkDerivation rec { pname = "alsaequal"; - version = "0.6"; + version = "0.7.1"; src = fetchFromGitHub { owner = "bassdr"; repo = "alsaequal"; rev = "refs/tags/v${version}"; - hash = "sha256-cCo8qWQv4bQ+RvH43Xbj+Q4qC5DmvracBuzI96EAnhY="; + hash = "sha256-jI+w/jCFslQSNeIS7mwb+LZSawU4XjbSNNgpvuShH1g="; }; - buildInputs = [ alsa-lib ]; + buildInputs = [ + alsa-lib + ladspaH + ]; makeFlags = [ "DESTDIR=$(out)" ]; @@ -22,10 +26,6 @@ stdenv.mkDerivation rec { # Adds executable permissions to resulting libraries # and changes their destination directory from "usr/lib/alsa-lib" to "lib/alsa-lib" to better align with nixpkgs filesystem hierarchy. ./makefile.patch - # Fixes control port check, which resulted in false error. - ./false_error.patch - # Fixes name change of an "Eq" to "Eq10" method in version 9 of caps library. - ./caps_9.x.patch ]; postPatch = '' diff --git a/pkgs/tools/audio/alsaequal/false_error.patch b/pkgs/tools/audio/alsaequal/false_error.patch deleted file mode 100644 index 1a8413da2741c..0000000000000 --- a/pkgs/tools/audio/alsaequal/false_error.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- ./ctl_equal.c -+++ ./ctl_equal.c -@@ -263,8 +263,8 @@ - for(i = 0; i < equal->num_input_controls; i++) { - if(equal->control_data->control[i].type == LADSPA_CNTRL_INPUT) { - index = equal->control_data->control[i].index; -- if(equal->klass->PortDescriptors[index] != -- (LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL)) { -+ if(equal->klass->PortDescriptors[index] & -+ (LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL) == 0) { - SNDERR("Problem with control file %s, %d.", controls, index); - return -1; - } diff --git a/pkgs/tools/audio/alsaequal/makefile.patch b/pkgs/tools/audio/alsaequal/makefile.patch index 5fd7062d73dea..2dc46a4c8d2b4 100644 --- a/pkgs/tools/audio/alsaequal/makefile.patch +++ b/pkgs/tools/audio/alsaequal/makefile.patch @@ -4,10 +4,12 @@ install: all @echo Installing... -- $(Q)install -m 644 $(SND_PCM_BIN) /usr/lib/alsa-lib/ -- $(Q)install -m 644 $(SND_CTL_BIN) /usr/lib/alsa-lib/ -+ $(Q)install -m 755 $(SND_PCM_BIN) ${DESTDIR}/lib/alsa-lib/ -+ $(Q)install -m 755 $(SND_CTL_BIN) ${DESTDIR}/lib/alsa-lib/ +- $(Q)mkdir -p ${DESTDIR}/usr/$(LIBDIR)/alsa-lib/ +- $(Q)install -m 755 $(SND_PCM_BIN) ${DESTDIR}/usr/$(LIBDIR)/alsa-lib/ +- $(Q)install -m 755 $(SND_CTL_BIN) ${DESTDIR}/usr/$(LIBDIR)/alsa-lib/ ++ $(Q)mkdir -p ${DESTDIR}/$(LIBDIR)/alsa-lib/ ++ $(Q)install -m 755 $(SND_PCM_BIN) ${DESTDIR}/$(LIBDIR)/alsa-lib/ ++ $(Q)install -m 755 $(SND_CTL_BIN) ${DESTDIR}/$(LIBDIR)/alsa-lib/ uninstall: @echo Un-installing...