2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchurl
|
2021-06-10 03:57:09 +01:00
|
|
|
, alsa-lib, caps
|
2020-03-07 17:56:11 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-12-01 12:46:39 +00:00
|
|
|
pname = "alsaequal";
|
2020-03-07 17:56:11 +00:00
|
|
|
version = "0.6";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://thedigitalmachine.net/tools/alsaequal-${version}.tar.bz2";
|
|
|
|
sha256 = "1w3g9q5z3nrn3mwdhaq6zsg0jila8d102dgwgrhj9vfx58apsvli";
|
|
|
|
};
|
|
|
|
|
2021-06-10 03:57:09 +01:00
|
|
|
buildInputs = [ alsa-lib ];
|
2020-03-07 17:56:11 +00:00
|
|
|
|
|
|
|
makeFlags = [ "DESTDIR=$(out)" ];
|
|
|
|
|
|
|
|
# Borrowed from Arch Linux's AUR
|
|
|
|
patches = [
|
|
|
|
# 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 = ''
|
|
|
|
sed -i 's#/usr/lib/ladspa/caps\.so#${caps}/lib/ladspa/caps\.so#g' ctl_equal.c pcm_equal.c
|
|
|
|
'';
|
|
|
|
|
|
|
|
preInstall = ''
|
|
|
|
mkdir -p "$out/lib/alsa-lib"
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-03-07 17:56:11 +00:00
|
|
|
description = "Real-time adjustable equalizer plugin for ALSA";
|
|
|
|
homepage = "https://thedigitalmachine.net/alsaequal.html";
|
|
|
|
license = licenses.gpl2;
|
2020-03-08 15:11:16 +00:00
|
|
|
maintainers = with maintainers; [ ymeister ];
|
2020-03-07 17:56:11 +00:00
|
|
|
};
|
|
|
|
}
|