alsa-scarlett-gui: add alsa-utils to PATH

alsa-scarlett-gui tries to call alsactl when saving a configuration,
which fails, when alsa-utils is not on the PATH
This commit is contained in:
sohalt 2023-08-22 20:20:03 +02:00
parent bb604b3a76
commit 1892d71c10

View file

@ -2,6 +2,8 @@
, stdenv , stdenv
, fetchFromGitHub , fetchFromGitHub
, pkg-config , pkg-config
, makeWrapper
, alsa-utils
, alsa-lib , alsa-lib
, gtk4 , gtk4
, wrapGAppsHook4 , wrapGAppsHook4
@ -22,9 +24,11 @@ stdenv.mkDerivation rec {
makeFlags = [ "DESTDIR=\${out}" "PREFIX=''" ]; makeFlags = [ "DESTDIR=\${out}" "PREFIX=''" ];
sourceRoot = "${src.name}/src"; sourceRoot = "${src.name}/src";
nativeBuildInputs = [ pkg-config wrapGAppsHook4 ]; nativeBuildInputs = [ pkg-config wrapGAppsHook4 makeWrapper ];
buildInputs = [ gtk4 alsa-lib ]; buildInputs = [ gtk4 alsa-lib ];
postInstall = '' postInstall = ''
wrapProgram $out/bin/alsa-scarlett-gui --prefix PATH : ${lib.makeBinPath [ alsa-utils ]}
substituteInPlace $out/share/applications/vu.b4.alsa-scarlett-gui.desktop \ substituteInPlace $out/share/applications/vu.b4.alsa-scarlett-gui.desktop \
--replace "Exec=/bin/alsa-scarlett-gui" "Exec=$out/bin/alsa-scarlett-gui" --replace "Exec=/bin/alsa-scarlett-gui" "Exec=$out/bin/alsa-scarlett-gui"
''; '';