summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorAmanda Cameron <amanda@darkdna.net>2019-10-05 14:54:02 -0400
committerAmanda Cameron <amanda@darkdna.net>2019-10-05 14:54:02 -0400
commit317a011e5e250f57f82663b922f8aa762295c170 (patch)
treefdb86d10ba590991a04f87df8a0caa8b6f5c5ab9 /pkgs
parent922de4f4b54858a4938a5593d50b5a5eecd47712 (diff)
downloadnixpkgs-317a011e5e250f57f82663b922f8aa762295c170.tar
nixpkgs-317a011e5e250f57f82663b922f8aa762295c170.tar.gz
nixpkgs-317a011e5e250f57f82663b922f8aa762295c170.tar.bz2
nixpkgs-317a011e5e250f57f82663b922f8aa762295c170.tar.lz
nixpkgs-317a011e5e250f57f82663b922f8aa762295c170.tar.xz
nixpkgs-317a011e5e250f57f82663b922f8aa762295c170.tar.zst
nixpkgs-317a011e5e250f57f82663b922f8aa762295c170.zip
vscode: Make it so that it places the .app in /Applications on macOS
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/applications/editors/vscode/generic.nix6
-rw-r--r--pkgs/applications/editors/vscode/vscodium.nix8
2 files changed, 9 insertions, 5 deletions
diff --git a/pkgs/applications/editors/vscode/generic.nix b/pkgs/applications/editors/vscode/generic.nix
index 7b7209a5e1f..bdcf786f61d 100644
--- a/pkgs/applications/editors/vscode/generic.nix
+++ b/pkgs/applications/editors/vscode/generic.nix
@@ -69,9 +69,9 @@ in
 
     installPhase =
       if system == "x86_64-darwin" then ''
-        mkdir -p $out/lib/vscode $out/bin
-        cp -r ./* $out/lib/vscode
-        ln -s $out/lib/vscode/Contents/Resources/app/bin/${executableName} $out/bin
+        mkdir -p "$out/Applications/${longName}.app" $out/bin
+        cp -r ./* "$out/Applications/${longName}.app"
+        ln -s "$out/Applications/${longName}.app/Contents/Resources/app/bin/code" $out/bin/${executableName}
       '' else ''
         mkdir -p $out/lib/vscode $out/bin
         cp -r ./* $out/lib/vscode
diff --git a/pkgs/applications/editors/vscode/vscodium.nix b/pkgs/applications/editors/vscode/vscodium.nix
index b526d8fe327..3024ea10799 100644
--- a/pkgs/applications/editors/vscode/vscodium.nix
+++ b/pkgs/applications/editors/vscode/vscodium.nix
@@ -14,8 +14,14 @@ let
     x86_64-linux = "15m7mfb8gmx3pwydc37blj0rxwgmkrnqfj6y79rpqlr2dg92gwlb";
     x86_64-darwin = "080k4fnfa5ylmmya6zprgci3gld9mrbqsfnk53hgcny91ykl5xj5";
   }.${system};
+
+  sourceRoot = {
+    x86_64-linux = ".";
+    x86_64-darwin = "";
+  }.${system};
 in
   callPackage ./generic.nix rec {
+    inherit sourceRoot;
 
     version = "1.38.1";
     pname = "vscodium";
@@ -29,8 +35,6 @@ in
       inherit sha256;
     };
 
-    sourceRoot = ".";
-
     meta = with stdenv.lib; {
       description = ''
         Open source source code editor developed by Microsoft for Windows,