about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/editors/vscode
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/applications/editors/vscode')
-rw-r--r--nixpkgs/pkgs/applications/editors/vscode/generic.nix19
-rw-r--r--nixpkgs/pkgs/applications/editors/vscode/vscode.nix12
-rw-r--r--nixpkgs/pkgs/applications/editors/vscode/vscodium.nix10
3 files changed, 30 insertions, 11 deletions
diff --git a/nixpkgs/pkgs/applications/editors/vscode/generic.nix b/nixpkgs/pkgs/applications/editors/vscode/generic.nix
index 4363f83ba037..7a3f34828ee2 100644
--- a/nixpkgs/pkgs/applications/editors/vscode/generic.nix
+++ b/nixpkgs/pkgs/applications/editors/vscode/generic.nix
@@ -7,6 +7,9 @@
 # Populate passthru.tests
 , tests
 
+# needed to fix "Save as Root"
+, nodePackages, bash
+
 # Attributes inherit from specific versions
 , version, src, meta, sourceRoot
 , executableName, longName, shortName, pname, updateScript
@@ -108,6 +111,22 @@ let
       )
     '';
 
+    # See https://github.com/NixOS/nixpkgs/issues/49643#issuecomment-873853897
+    # linux only because of https://github.com/NixOS/nixpkgs/issues/138729
+    postPatch = lib.optionalString stdenv.isLinux ''
+      # this is a fix for "save as root" functionality
+      packed="resources/app/node_modules.asar"
+      unpacked="resources/app/node_modules"
+      ${nodePackages.asar}/bin/asar extract "$packed" "$unpacked"
+      substituteInPlace $unpacked/sudo-prompt/index.js \
+        --replace "/usr/bin/pkexec" "/run/wrappers/bin/pkexec" \
+        --replace "/bin/bash" "${bash}/bin/bash"
+      rm -rf "$packed"
+
+      # this fixes bundled ripgrep
+      chmod +x resources/app/node_modules/vscode-ripgrep/bin/rg
+    '';
+
     inherit meta;
   };
 
diff --git a/nixpkgs/pkgs/applications/editors/vscode/vscode.nix b/nixpkgs/pkgs/applications/editors/vscode/vscode.nix
index e6a5a9d5dca7..a9a9fcdf7b4c 100644
--- a/nixpkgs/pkgs/applications/editors/vscode/vscode.nix
+++ b/nixpkgs/pkgs/applications/editors/vscode/vscode.nix
@@ -14,17 +14,17 @@ let
   archive_fmt = if stdenv.isDarwin then "zip" else "tar.gz";
 
   sha256 = {
-    x86_64-linux = "0g49765pnimh107pw3q7dlgd6jcmr5gagsvxrdx8i93mbxb0xm0c";
-    x86_64-darwin = "1837fcpllblm970jxsal0ahxsnjmsgydy6g6qn51hp7f797gi7zb";
-    aarch64-linux = "1bpmgv6hjyb7jl9v8qyqiyr0brl4xq3wnls2v9hirja6ls1x14cx";
-    aarch64-darwin = "0qksfscbiyr2ynw3j86g8wm7myyabkjwx03ik3z6rrv7dffb5yii";
-    armv7l-linux = "063p2wy1wl57p43f3md0wp2d981nnb650hyqs9rgqm4mlk2s168g";
+    x86_64-linux = "0ma8pysww4r3p73rf94wddxk2ar091yw8mk1gi9jawiqvb9ksx0m";
+    x86_64-darwin = "008v7hxv71bvfp52wfx3sg97s54bn2klvy5xfjh48wcaka10vsj0";
+    aarch64-linux = "1wi5bmjdjfy1la3lwb3c389cjbn4q12j1214vna9214d8if37dyv";
+    aarch64-darwin = "14v0gq4kj0lxa6pwi7nbdpw0l25yfcqydigfzhmwrp8ipbnma62k";
+    armv7l-linux = "0h94gzwxknlvfy9gcd0zq4qsjmr9zr22adbfrqm1gvv1aksmgm4b";
   }.${system};
 in
   callPackage ./generic.nix rec {
     # Please backport all compatible updates to the stable release.
     # This is important for the extension ecosystem.
-    version = "1.60.0";
+    version = "1.60.2";
     pname = "vscode";
 
     executableName = "code" + lib.optionalString isInsiders "-insiders";
diff --git a/nixpkgs/pkgs/applications/editors/vscode/vscodium.nix b/nixpkgs/pkgs/applications/editors/vscode/vscodium.nix
index 27b698c45ba8..fb2417389652 100644
--- a/nixpkgs/pkgs/applications/editors/vscode/vscodium.nix
+++ b/nixpkgs/pkgs/applications/editors/vscode/vscodium.nix
@@ -13,10 +13,10 @@ let
   archive_fmt = if system == "x86_64-darwin" then "zip" else "tar.gz";
 
   sha256 = {
-    x86_64-linux = "1l3khnqb8icapnwk4pr4s639dqsvjy1k51km2p9ywnrjdg9byc12";
-    x86_64-darwin = "1lb63rz9mzcw5yg3cqi022m1ldvmbxz5z70axc9n6dci8aals663";
-    aarch64-linux = "0c0rxzhayklgnaf0r4hj6rwdh5qbb449vi5ja0asfyni4k2nalr5";
-    armv7l-linux = "0xs8wsad64cni8vpzfh2aqgdsnsy4hwc25msl79prvh17794k8jy";
+    x86_64-linux = "03z6wpzbvf046sl1mjvvcshy5czvr4bq2f3ajlr8bj39y9df93h9";
+    x86_64-darwin = "0cs5ikf5dxkg9qkyaq75h0rypil80sk6zmbb0s63191gj6l569yl";
+    aarch64-linux = "05ivgn72v05yy3a9qly4qx0qpyjd2r3ygdw978zc8z09694g5x3i";
+    armv7l-linux = "044izh9ap5s50k796zjcfk0p997b7sfryshp4gaxh3yf5qs0w7l9";
   }.${system};
 
   sourceRoot = {
@@ -31,7 +31,7 @@ in
 
     # Please backport all compatible updates to the stable release.
     # This is important for the extension ecosystem.
-    version = "1.60.0";
+    version = "1.60.1";
     pname = "vscodium";
 
     executableName = "codium";