about summary refs log tree commit diff
path: root/pkgs/applications
diff options
context:
space:
mode:
authormatt <gnumber13@e.mail.de>2023-07-30 00:06:46 +0200
committerAnderson Torres <torres.anderson.85@protonmail.com>2023-08-01 11:05:59 +0000
commit66f8bb0d81ce0ac35cf505f5ea85abdb7ee12149 (patch)
treefac0fbcd2c11f72a0113a11bdd4fd93dcf5159a8 /pkgs/applications
parent18dd51567e0fa185aa44abe10f28bc3a1309f1c5 (diff)
alsa-scarlett-gui: fix for deskop integration
Now pretty much any DE should support the desktop entry file.
The targetpath for the "Exec=" key is now absolute and targets the
binary in the nix store. This also applies to the "Icon=" key.
Also "substitueInPlace" is used to manipulate the default desktop entry
file.
Diffstat (limited to 'pkgs/applications')
-rw-r--r--pkgs/applications/audio/alsa-scarlett-gui/default.nix4
1 files changed, 3 insertions, 1 deletions
diff --git a/pkgs/applications/audio/alsa-scarlett-gui/default.nix b/pkgs/applications/audio/alsa-scarlett-gui/default.nix
index 19a19d85609d5..2a70103b55c43 100644
--- a/pkgs/applications/audio/alsa-scarlett-gui/default.nix
+++ b/pkgs/applications/audio/alsa-scarlett-gui/default.nix
@@ -25,7 +25,9 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [ pkg-config wrapGAppsHook4 ];
   buildInputs = [ gtk4 alsa-lib ];
   postInstall = ''
-      sed -Ei "s/(Exec\s?=\s?).*/\1alsa-scarlett-gui\nTryExec=alsa-scarlett-gui/" $out/share/applications/vu.b4.${pname}.desktop
+      substituteInPlace $out/share/applications/vu.b4.${pname}.desktop \
+        --replace "Exec=/bin/alsa-scarlett-gui" "Exec=$out/bin/alsa-scarlett-gui" \
+        --replace "Icon=alsa-scarlett-gui" "Icon=$out/share/icons/hicolor/256x256/apps/alsa-scarlett-gui.png"
   '';
 
   # causes redefinition of _FORTIFY_SOURCE