From 2901fd1b0cfea9a39d253147335a1c61f07a88ef Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Fri, 16 Sep 2022 17:57:45 +0200 Subject: [PATCH] sublime-merge: Avoid absolute exec paths in desktop file When user installed a new version of SM (or just a different derivation), GNOME Shell would lose the association of the windows with the icon. Since the package needs to be installed in order for the desktop file to be available, having the path absolute is useless any way. Same change as the one for sublime4 in the parent commit. --- pkgs/applications/version-management/sublime-merge/common.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/version-management/sublime-merge/common.nix b/pkgs/applications/version-management/sublime-merge/common.nix index 8cb447445c69..998b1793c187 100644 --- a/pkgs/applications/version-management/sublime-merge/common.nix +++ b/pkgs/applications/version-management/sublime-merge/common.nix @@ -98,7 +98,7 @@ in stdenv.mkDerivation (rec { makeWrapper "''$${primaryBinary}/${primaryBinary}" "$out/bin/${primaryBinary}" '' + builtins.concatStringsSep "" (map (binaryAlias: "ln -s $out/bin/${primaryBinary} $out/bin/${binaryAlias}\n") primaryBinaryAliases) + '' mkdir -p "$out/share/applications" - substitute "''$${primaryBinary}/${primaryBinary}.desktop" "$out/share/applications/${primaryBinary}.desktop" --replace "/opt/${primaryBinary}/${primaryBinary}" "$out/bin/${primaryBinary}" + substitute "''$${primaryBinary}/${primaryBinary}.desktop" "$out/share/applications/${primaryBinary}.desktop" --replace "/opt/${primaryBinary}/${primaryBinary}" "${primaryBinary}" for directory in ''$${primaryBinary}/Icon/*; do size=$(basename $directory) mkdir -p "$out/share/icons/hicolor/$size/apps"