about summary refs log tree commit diff
path: root/pkgs/applications
diff options
context:
space:
mode:
authorworldofpeace <worldofpeace@protonmail.ch>2020-04-01 00:35:01 -0400
committerworldofpeace <worldofpeace@protonmail.ch>2020-04-01 00:35:01 -0400
commit0bb661d512329235ca6102f123d04a8cf0d48629 (patch)
tree8ac07bd75194b5e312d20c235d9efafeeebf41e4 /pkgs/applications
parent14565eb2b32d375c62ceccfc0c8d5e5e7a18da92 (diff)
downloadnixlib-0bb661d512329235ca6102f123d04a8cf0d48629.tar
nixlib-0bb661d512329235ca6102f123d04a8cf0d48629.tar.gz
nixlib-0bb661d512329235ca6102f123d04a8cf0d48629.tar.bz2
nixlib-0bb661d512329235ca6102f123d04a8cf0d48629.tar.lz
nixlib-0bb661d512329235ca6102f123d04a8cf0d48629.tar.xz
nixlib-0bb661d512329235ca6102f123d04a8cf0d48629.tar.zst
nixlib-0bb661d512329235ca6102f123d04a8cf0d48629.zip
vscode: Don't hardcode icon
This also allows people to use a vscode
icon that is shipped with their theme. (provided it is called code)

Fixes #83846
Diffstat (limited to 'pkgs/applications')
-rw-r--r--pkgs/applications/editors/vscode/generic.nix12
1 files changed, 5 insertions, 7 deletions
diff --git a/pkgs/applications/editors/vscode/generic.nix b/pkgs/applications/editors/vscode/generic.nix
index a573c518b5d6..abd4a55c92b8 100644
--- a/pkgs/applications/editors/vscode/generic.nix
+++ b/pkgs/applications/editors/vscode/generic.nix
@@ -25,7 +25,7 @@ in
       comment = "Code Editing. Redefined.";
       genericName = "Text Editor";
       exec = executableName;
-      icon = "@out@/share/pixmaps/code.png";
+      icon = "code";
       startupNotify = "true";
       categories = "Utility;TextEditor;Development;IDE;";
       mimeType = "text/plain;inode/directory;";
@@ -37,7 +37,7 @@ in
         [Desktop Action new-empty-window]
         Name=New Empty Window
         Exec=${executableName} --new-window %F
-        Icon=@out@/share/pixmaps/code.png
+        Icon=code
       '';
     };
 
@@ -47,7 +47,7 @@ in
       comment = "Code Editing. Redefined.";
       genericName = "Text Editor";
       exec = executableName + " --open-url %U";
-      icon = "@out@/share/pixmaps/code.png";
+      icon = "code";
       startupNotify = "true";
       categories = "Utility;TextEditor;Development;IDE;";
       mimeType = "x-scheme-handler/vscode;";
@@ -83,10 +83,8 @@ in
         ln -s $out/lib/vscode/bin/${executableName} $out/bin
 
         mkdir -p $out/share/applications
-        substitute $desktopItem/share/applications/${executableName}.desktop $out/share/applications/${executableName}.desktop \
-          --subst-var out
-        substitute $urlHandlerDesktopItem/share/applications/${executableName}-url-handler.desktop $out/share/applications/${executableName}-url-handler.desktop \
-          --subst-var out
+        ln -s $desktopItem/share/applications/${executableName}.desktop $out/share/applications/${executableName}.desktop
+        ln -s $urlHandlerDesktopItem/share/applications/${executableName}-url-handler.desktop $out/share/applications/${executableName}-url-handler.desktop
 
         mkdir -p $out/share/pixmaps
         cp $out/lib/vscode/resources/app/resources/linux/code.png $out/share/pixmaps/code.png