From 4d8c0313b893fb079c1e29b850114b0ceca9df9d Mon Sep 17 00:00:00 2001 From: Edmund Wu <22758444+eadwu@users.noreply.github.com> Date: Sun, 10 Jun 2018 18:23:30 -0400 Subject: [PATCH] nixos/vscode-with-extensions: add desktop file (#41803) --- pkgs/applications/editors/vscode/with-extensions.nix | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/editors/vscode/with-extensions.nix b/pkgs/applications/editors/vscode/with-extensions.nix index c54c8a4277f1..9b0d69ae65aa 100644 --- a/pkgs/applications/editors/vscode/with-extensions.nix +++ b/pkgs/applications/editors/vscode/with-extensions.nix @@ -12,7 +12,7 @@ # When the extension is already available in the default extensions set. vscodeExtensions = with vscode-extensions; [ bbenoist.Nix - ] + ] # Concise version from the vscode market place when not available in the default set. ++ vscode-utils.extensionsFromVscodeMarketplace [ @@ -26,11 +26,11 @@ } ~~~ - This expression should fetch + This expression should fetch - the *nix* vscode extension from whatever source defined in the default nixpkgs extensions set `vscodeExtensions`. - - the *code-runner* vscode extension from the marketplace using the + - the *code-runner* vscode extension from the marketplace using the following url: ~~~ @@ -72,6 +72,11 @@ runCommand "${wrappedPkgName}-with-extensions-${wrappedPkgVersion}" { meta = vscode.meta; } '' mkdir -p "$out/bin" + mkdir -p "$out/share/applications" + mkdir -p "$out/share/pixmaps" + + ln -sT "${vscode}/share/applications/code.desktop" "$out/share/applications/code.desktop" + ln -sT "${vscode}/share/pixmaps/code.png" "$out/share/pixmaps/code.png" ${if [] == vscodeExtensions then '' ln -sT "${vscode}/bin/${wrappedExeName}" "$out/bin/${exeName}"