Merge pull request #312526 from chewblacka/fix-alsa-scarlett-gui

alsa-scarlett-gui: fix path of alsactl
This commit is contained in:
Sandro 2024-05-20 01:28:17 +02:00 committed by GitHub
commit 43598839ff
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -16,22 +16,28 @@ stdenv.mkDerivation rec {
src = fetchFromGitHub {
owner = "geoffreybennett";
repo = pname;
repo = "alsa-scarlett-gui";
rev = version;
sha256 = "sha256-+74JRQn2xwgPHZSrp5b+uny0+aLnsFvx/cOKIdj4J40=";
hash = "sha256-+74JRQn2xwgPHZSrp5b+uny0+aLnsFvx/cOKIdj4J40=";
};
NIX_CFLAGS_COMPILE = [ "-Wno-error=deprecated-declarations" ];
makeFlags = [ "DESTDIR=\${out}" "PREFIX=''" ];
sourceRoot = "${src.name}/src";
postPatch = ''
substituteInPlace file.c \
--replace-fail "/usr/sbin/alsactl" "${alsa-utils}/bin/alsactl"
'';
nativeBuildInputs = [ pkg-config wrapGAppsHook4 makeWrapper ];
buildInputs = [ gtk4 alsa-lib openssl ];
postInstall = ''
wrapProgram $out/bin/alsa-scarlett-gui --prefix PATH : ${lib.makeBinPath [ alsa-utils ]}
substituteInPlace $out/share/applications/vu.b4.alsa-scarlett-gui.desktop \
--replace "Exec=/bin/alsa-scarlett-gui" "Exec=$out/bin/alsa-scarlett-gui"
--replace-fail "Exec=/bin/alsa-scarlett-gui" "Exec=$out/bin/alsa-scarlett-gui"
'';
# causes redefinition of _FORTIFY_SOURCE