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/extensions/default.nix106
-rwxr-xr-xnixpkgs/pkgs/applications/editors/vscode/extensions/update_installed_exts.sh2
-rw-r--r--nixpkgs/pkgs/applications/editors/vscode/generic.nix346
-rw-r--r--nixpkgs/pkgs/applications/editors/vscode/vscode.nix16
-rw-r--r--nixpkgs/pkgs/applications/editors/vscode/vscodium.nix12
5 files changed, 270 insertions, 212 deletions
diff --git a/nixpkgs/pkgs/applications/editors/vscode/extensions/default.nix b/nixpkgs/pkgs/applications/editors/vscode/extensions/default.nix
index 1f5d14282d20..c0d3415713fc 100644
--- a/nixpkgs/pkgs/applications/editors/vscode/extensions/default.nix
+++ b/nixpkgs/pkgs/applications/editors/vscode/extensions/default.nix
@@ -343,11 +343,16 @@ let
         mktplcRef = {
           name = "vscode-neovim";
           publisher = "asvetliakov";
-          version = "0.0.97";
-          sha256 = "sha256-rNGW8WB3jBSjThiB0j4/ORKMRAaxFiMiBfaa+dbGu/w=";
+          version = "0.8.2";
+          sha256 = "0kw9asv91s37ql61blbb8pr7wb6c2ba1klchal53chp6ib55v5kn";
         };
         meta = {
+          changelog = "https://marketplace.visualstudio.com/items/asvetliakov.vscode-neovim/changelog";
+          description = "Vim-mode for VS Code using embedded Neovim";
+          downloadPage = "https://marketplace.visualstudio.com/items?itemName=asvetliakov.vscode-neovim";
           license = lib.licenses.mit;
+          homepage = "https://github.com/vscode-neovim/vscode-neovim";
+          maintainers = [ lib.maintainers.mikaelfangel ];
         };
       };
 
@@ -700,8 +705,8 @@ let
         mktplcRef = {
           name = "ruff";
           publisher = "charliermarsh";
-          version = "2023.38.0";
-          sha256 = "sha256-Gcw+X8e8MrTflotHUwkrdP/DD/6AX/kEgtRiqvqyqRM=";
+          version = "2023.40.0";
+          sha256 = "sha256-Ym76WtKvz18NgxH9o8O/Ozn+/AtqLvjJs8ffLhPOWkQ=";
         };
         meta = {
           license = lib.licenses.mit;
@@ -727,8 +732,8 @@ let
         mktplcRef = {
           name = "chatgpt-reborn";
           publisher = "chris-hayes";
-          version = "3.16.3";
-          sha256 = "wkitG5gmYKYKXRw/zVW04HN1dePiTjbnynFOY/bwxfI=";
+          version = "3.19.1";
+          sha256 = "1msb3lqy9p2v26nsw0clfsisiwxcid3jp1l6549hk1i1gcqhd84w";
         };
       };
 
@@ -736,8 +741,8 @@ let
         mktplcRef = {
           name = "path-intellisense";
           publisher = "christian-kohler";
-          version = "2.8.4";
-          sha256 = "sha256-FEBYcjJHOwmxVHhhyxqOpk/V6hvtMkhkvLVpmJCMSZw=";
+          version = "2.8.5";
+          sha256 = "1ndffv1m4ayiija1l42m28si44vx9y6x47zpxzqv2j4jj7ga1n5z";
         };
         meta = {
           description = "Visual Studio Code plugin that autocompletes filenames";
@@ -896,8 +901,8 @@ let
         mktplcRef = {
           name = "vscode-markdownlint";
           publisher = "DavidAnson";
-          version = "0.51.0";
-          sha256 = "sha256-Xtr8cqcPrcrKpJBxQcY1j9Gl4CC6U3ZazS4bdBtdzUk=";
+          version = "0.52.0";
+          sha256 = "sha256-Y8qkcNEvJ/yzT8PDeErRzKGxYBNKKfbNNsJVaFDeIV4=";
         };
         meta = {
           changelog = "https://marketplace.visualstudio.com/items/DavidAnson.vscode-markdownlint/changelog";
@@ -1224,8 +1229,8 @@ let
         mktplcRef = {
           name = "elixir-ls";
           publisher = "JakeBecker";
-          version = "0.16.0";
-          sha256 = "sha256-PZUyOZ/U6OkGid+PYY2G/pAe5R5eumUibKNel9HBI+s=";
+          version = "0.17.1";
+          sha256 = "sha256-WBtIdz+8zsyTl43ovU3Dz+8p154ZGvHp6BA3AQtXN/U=";
         };
         meta = {
           changelog = "https://marketplace.visualstudio.com/items/JakeBecker.elixir-ls/changelog";
@@ -1400,8 +1405,8 @@ let
         mktplcRef = {
           name = "vscode-firefox-debug";
           publisher = "firefox-devtools";
-          version = "2.9.8";
-          sha256 = "sha256-MCL562FPgEfhUM1KH5LMl7BblbjIkQ4UEwB67RlO5Mk=";
+          version = "2.9.10";
+          sha256 = "sha256-xuvlE8L/qjOn8Qhkv9sutn/xRbwC9V/IIfEr4Ixm1vA=";
         };
         meta = {
           changelog = "https://marketplace.visualstudio.com/items/firefox-devtools.vscode-firefox-debug/changelog";
@@ -1570,9 +1575,10 @@ let
         mktplcRef = {
           publisher = "github";
           name = "copilot";
-          version = "1.89.156";
-          sha256 = "sha256-BJnYd9D3bWrZI8UETnAua8ngVjZJ7EXB1UrZAjVnx1E=";
+          version = "1.126.493";
+          sha256 = "1an7z8z3xz2piw2xz1hdrs6l5rhpyvnjmb650ff2m4k24n01svfy";
         };
+
         meta = {
           description = "GitHub Copilot uses OpenAI Codex to suggest code and entire functions in real-time right from your editor.";
           downloadPage = "https://marketplace.visualstudio.com/items?itemName=GitHub.copilot";
@@ -1640,8 +1646,8 @@ let
           # the VSCode Marketplace and use a calver scheme. We should avoid
           # using preview versions, because they can require insider versions
           # of VS Code
-          version = "0.68.1";
-          sha256 = "sha256-d60ZxWQLZa2skOB3Iv9K04aGNZA1d1A82N7zRaxAzlI=";
+          version = "0.75.2023101209";
+          sha256 = "1saz4brd5k1wyy7pz1h3jcl4kq35f78s2q8drjd7v2k97jhy8la1";
         };
         meta = { license = lib.licenses.mit; };
       };
@@ -1886,8 +1892,8 @@ let
         mktplcRef = {
           name = "latex-workshop";
           publisher = "James-Yu";
-          version = "9.10.0";
-          sha256 = "s0+8952svPSA69M4H29zuIxUWV6xNRpIqLNd8pzGJhY=";
+          version = "9.14.1";
+          sha256 = "1a8im7n25jy2zyqcqhscj62bamhwzp6kk6hdarb0p38d4pwwzxbm";
         };
         meta = {
           changelog = "https://marketplace.visualstudio.com/items/James-Yu.latex-workshop/changelog";
@@ -2356,9 +2362,10 @@ let
         mktplcRef = {
           name = "direnv";
           publisher = "mkhl";
-          version = "0.14.0";
-          sha256 = "sha256-T+bt6ku+zkqzP1gXNLcpjtFAevDRiSKnZaE7sM4pUOs=";
+          version = "0.15.2";
+          sha256 = "06lp4qgnksklgc6nvx1l9z38y7apbx0a6v886nd15aq9rq8my0ka";
         };
+
         meta = {
           description = "direnv support for Visual Studio Code";
           license = lib.licenses.bsd0;
@@ -2721,12 +2728,15 @@ let
         };
       };
 
+
       nvarner.typst-lsp = buildVscodeMarketplaceExtension {
         mktplcRef = {
           name = "typst-lsp";
           publisher = "nvarner";
-          version = "0.5.0";
-          sha256 = "sha256-4bZbjbcd/EjSRBMkzMs1pD00qyQb5W6gePh4xfoU6Ug=";
+          # Please update the corresponding binary (typst-lsp) when updating
+          # this extension.
+          version = "0.10.1";
+          sha256 = "sha256-+LOw9JPpL5eLNxmP4kyPo9S/w8ZxfPGSaY1oR8THmvI=";
         };
 
         nativeBuildInputs = [ jq moreutils ];
@@ -2827,8 +2837,8 @@ let
         mktplcRef = {
           name = "material-icon-theme";
           publisher = "PKief";
-          version = "4.29.0";
-          sha256 = "sha256-YqleqYSpZuhGFGkNo3FRLjiglxX+iUCJl69CRCY/oWM=";
+          version = "4.31.0";
+          sha256 = "0rn4dyqr46wbgi4k27ni6a6i3pa83gyaprhds5rlndjaw90iakb4";
         };
         meta = {
           license = lib.licenses.mit;
@@ -2893,8 +2903,8 @@ let
         mktplcRef = {
           name = "vscode-xml";
           publisher = "redhat";
-          version = "0.25.2023032304";
-          sha256 = "sha256-3hU/MZU9dP91p2PVycFL6yg/nf4/x8tt76vmlkiHnE8=";
+          version = "0.26.2023092519";
+          sha256 = "00p98qihw7ndwl4h18jx8n0lmrqsn1vab7h2k3cbjdz0b623j773";
         };
         meta.license = lib.licenses.epl20;
       };
@@ -2903,8 +2913,8 @@ let
         mktplcRef = {
           name = "vscode-yaml";
           publisher = "redhat";
-          version = "1.12.0";
-          sha256 = "sha256-r/me14KonxnQeensIYyWU4dQrhomc8h2ntYoiZ+Y7jE=";
+          version = "1.14.0";
+          sha256 = "0pww9qndd2vsizsibjsvscz9fbfx8srrj67x4vhmwr581q674944";
         };
         meta = {
           license = lib.licenses.mit;
@@ -3334,8 +3344,8 @@ let
         mktplcRef = {
           name = "vscode-tailscale";
           publisher = "tailscale";
-          version = "0.4.0";
-          sha256 = "sha256-c/BZHKHs2EKd37148dSxEeP1wBXv75HhDqzegmHPjOs=";
+          version = "0.6.4";
+          sha256 = "1jcq5kdcdyb5yyy0p9cnv56vmclvb6wdwq8xvy1qbkfdqbmy05gm";
         };
         meta = {
           changelog = "https://marketplace.visualstudio.com/items/tailscale.vscode-tailscale/changelog";
@@ -3507,6 +3517,22 @@ let
         };
       };
 
+      uiua-lang.uiua-vscode = buildVscodeMarketplaceExtension {
+        mktplcRef = {
+          name = "uiua-vscode";
+          publisher = "uiua-lang";
+          version = "0.0.19";
+          sha256 = "sha256-Tww1urq6CfLma254Sn5lwOYwbvxAeDZuBuFBQlzks1c=";
+        };
+        meta = {
+          description = "VSCode language extension for Uiua";
+          downloadPage = "https://marketplace.visualstudio.com/items?itemName=uiua-lang.uiua-vscode";
+          homepage = "https://github.com/uiua-lang/uiua-vscode";
+          license = lib.licenses.mit;
+          maintainers = [ lib.maintainers.wackbyte ];
+        };
+      };
+
       unifiedjs.vscode-mdx = buildVscodeMarketplaceExtension {
         mktplcRef = {
           name = "vscode-mdx";
@@ -3527,8 +3553,8 @@ let
         mktplcRef = {
           name = "errorlens";
           publisher = "usernamehw";
-          version = "3.12.0";
-          sha256 = "sha256-G5+We49/f5UwYqoBovegRK+UOT6KPZo85cvoDjD1Mu4=";
+          version = "3.14.0";
+          sha256 = "0k70f5f4hcv3jl3a04736ml8amx8w7wb3mb8f6l5gngnvq9fj528";
         };
         meta = {
           changelog = "https://marketplace.visualstudio.com/items/usernamehw.errorlens/changelog";
@@ -3693,8 +3719,8 @@ let
         mktplcRef = {
           name = "vim";
           publisher = "vscodevim";
-          version = "1.25.2";
-          sha256 = "sha256-hy2Ks6oRc9io6vfgql9aFGjUiRzBCS4mGdDO3NqIFEg=";
+          version = "1.26.1";
+          sha256 = "sha256-zshuABicdkT52Nqj1L2RrfMziBRgO+R15fM32SCnyXI=";
         };
         meta = {
           license = lib.licenses.mit;
@@ -3729,8 +3755,8 @@ let
         mktplcRef = {
           name = "gitblame";
           publisher = "waderyan";
-          version = "10.1.0";
-          sha256 = "TTYBaJ4gcMVICz4bGZTvbNRPpWD4tXuAJbI8QcHNDv0=";
+          version = "10.5.1";
+          sha256 = "119rf52xnxz0cwvvjjfc5m5iv19288cxz33xzr79b67wyfd79hl9";
         };
         meta = {
           changelog = "https://marketplace.visualstudio.com/items/waderyan.gitblame/changelog";
@@ -3867,8 +3893,8 @@ let
         mktplcRef = {
           name = "material-theme";
           publisher = "zhuangtongfa";
-          version = "3.15.8";
-          sha256 = "sha256-PwWGs9KRfV3qpYbgdiw8FYvnkaJQ2VW2H6p6+umk7eg=";
+          version = "3.16.2";
+          sha256 = "0ava94zn68lxy3ph78r5rma39qz03al5l5i6x070mpa1hzj3i319";
         };
         meta = {
           license = lib.licenses.mit;
diff --git a/nixpkgs/pkgs/applications/editors/vscode/extensions/update_installed_exts.sh b/nixpkgs/pkgs/applications/editors/vscode/extensions/update_installed_exts.sh
index 6fff7454493a..17fe10604340 100755
--- a/nixpkgs/pkgs/applications/editors/vscode/extensions/update_installed_exts.sh
+++ b/nixpkgs/pkgs/applications/editors/vscode/extensions/update_installed_exts.sh
@@ -1,5 +1,5 @@
 #! /usr/bin/env nix-shell
-#! nix-shell -i bash -p curl jq unzip
+#! nix-shell -i bash -p cacert curl jq unzip
 # shellcheck shell=bash
 set -eu -o pipefail
 
diff --git a/nixpkgs/pkgs/applications/editors/vscode/generic.nix b/nixpkgs/pkgs/applications/editors/vscode/generic.nix
index 39e4fbc966d7..693ffb4e9441 100644
--- a/nixpkgs/pkgs/applications/editors/vscode/generic.nix
+++ b/nixpkgs/pkgs/applications/editors/vscode/generic.nix
@@ -1,164 +1,55 @@
-{ stdenv, lib, makeDesktopItem
-, unzip, libsecret, libXScrnSaver, libxshmfence, buildPackages
-, atomEnv, at-spi2-atk, autoPatchelfHook
-, systemd, fontconfig, libdbusmenu, glib, buildFHSEnv, wayland
-, libglvnd, libkrb5
-
-# Populate passthru.tests
+{ stdenv
+, lib
+, makeDesktopItem
+, unzip
+, libsecret
+, libXScrnSaver
+, libxshmfence
+, buildPackages
+, at-spi2-atk
+, autoPatchelfHook
+, alsa-lib
+, mesa
+, nss
+, nspr
+, xorg
+, systemd
+, fontconfig
+, libdbusmenu
+, glib
+, buildFHSEnv
+, wayland
+, libglvnd
+, libkrb5
+
+  # Populate passthru.tests
 , tests
 
-# needed to fix "Save as Root"
-, asar, bash
-
-# Attributes inherit from specific versions
-, version, src, meta, sourceRoot, commandLineArgs
-, executableName, longName, shortName, pname, updateScript
+  # needed to fix "Save as Root"
+, asar
+, bash
+
+  # Attributes inherit from specific versions
+, version
+, src
+, meta
+, sourceRoot
+, commandLineArgs
+, executableName
+, longName
+, shortName
+, pname
+, updateScript
 , dontFixup ? false
-, rev ? null, vscodeServer ? null
+, rev ? null
+, vscodeServer ? null
 , sourceExecutableName ? executableName
 , useVSCodeRipgrep ? false
 , ripgrep
 }:
 
+stdenv.mkDerivation (finalAttrs:
 let
-  unwrapped = stdenv.mkDerivation {
-
-    inherit pname version src sourceRoot dontFixup;
-
-    passthru = {
-      inherit executableName longName tests updateScript;
-      fhs = fhs {};
-      fhsWithPackages = f: fhs { additionalPkgs = f; };
-    } // lib.optionalAttrs (vscodeServer != null) {
-      inherit rev vscodeServer;
-    };
-
-    desktopItem = makeDesktopItem {
-      name = executableName;
-      desktopName = longName;
-      comment = "Code Editing. Redefined.";
-      genericName = "Text Editor";
-      exec = "${executableName} %F";
-      icon = "vs${executableName}";
-      startupNotify = true;
-      startupWMClass = shortName;
-      categories = [ "Utility" "TextEditor" "Development" "IDE" ];
-      mimeTypes = [ "text/plain" "inode/directory" ];
-      keywords = [ "vscode" ];
-      actions.new-empty-window = {
-        name = "New Empty Window";
-        exec = "${executableName} --new-window %F";
-        icon = "vs${executableName}";
-      };
-    };
-
-    urlHandlerDesktopItem = makeDesktopItem {
-      name = executableName + "-url-handler";
-      desktopName = longName + " - URL Handler";
-      comment = "Code Editing. Redefined.";
-      genericName = "Text Editor";
-      exec = executableName + " --open-url %U";
-      icon = "vs${executableName}";
-      startupNotify = true;
-      categories = [ "Utility" "TextEditor" "Development" "IDE" ];
-      mimeTypes = [ "x-scheme-handler/vscode" ];
-      keywords = [ "vscode" ];
-      noDisplay = true;
-    };
-
-    buildInputs = [ libsecret libXScrnSaver libxshmfence ]
-      ++ lib.optionals (!stdenv.isDarwin) ([ at-spi2-atk libkrb5 ] ++ atomEnv.packages);
-
-    runtimeDependencies = lib.optionals stdenv.isLinux [ (lib.getLib systemd) fontconfig.lib libdbusmenu wayland libsecret ];
-
-    nativeBuildInputs = [ unzip ]
-      ++ lib.optionals stdenv.isLinux [
-        autoPatchelfHook
-        asar
-        # override doesn't preserve splicing https://github.com/NixOS/nixpkgs/issues/132651
-        (buildPackages.wrapGAppsHook.override { inherit (buildPackages) makeWrapper; })
-      ];
-
-    dontBuild = true;
-    dontConfigure = true;
-    noDumpEnvVars = true;
-
-    installPhase = ''
-      runHook preInstall
-    '' + (if stdenv.isDarwin then ''
-      mkdir -p "$out/Applications/${longName}.app" "$out/bin"
-      cp -r ./* "$out/Applications/${longName}.app"
-      ln -s "$out/Applications/${longName}.app/Contents/Resources/app/bin/${sourceExecutableName}" "$out/bin/${executableName}"
-    '' else ''
-      mkdir -p "$out/lib/vscode" "$out/bin"
-      cp -r ./* "$out/lib/vscode"
-
-      ln -s "$out/lib/vscode/bin/${sourceExecutableName}" "$out/bin/${executableName}"
-
-      mkdir -p "$out/share/applications"
-      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"
-
-      # These are named vscode.png, vscode-insiders.png, etc to match the name in upstream *.deb packages.
-      mkdir -p "$out/share/pixmaps"
-      cp "$out/lib/vscode/resources/app/resources/linux/code.png" "$out/share/pixmaps/vs${executableName}.png"
-
-      # Override the previously determined VSCODE_PATH with the one we know to be correct
-      sed -i "/ELECTRON=/iVSCODE_PATH='$out/lib/vscode'" "$out/bin/${executableName}"
-      grep -q "VSCODE_PATH='$out/lib/vscode'" "$out/bin/${executableName}" # check if sed succeeded
-
-      # Remove native encryption code, as it derives the key from the executable path which does not work for us.
-      # The credentials should be stored in a secure keychain already, so the benefit of this is questionable
-      # in the first place.
-      rm -rf $out/lib/vscode/resources/app/node_modules/vscode-encrypt
-    '') + ''
-      runHook postInstall
-    '';
-
-    preFixup = ''
-      gappsWrapperArgs+=(
-        # Add gio to PATH so that moving files to the trash works when not using a desktop environment
-        --prefix PATH : ${glib.bin}/bin
-        --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}"
-        --add-flags ${lib.escapeShellArg commandLineArgs}
-      )
-    '';
-
-    # 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"
-      asar extract "$packed" "$unpacked"
-      substituteInPlace $unpacked/@vscode/sudo-prompt/index.js \
-        --replace "/usr/bin/pkexec" "/run/wrappers/bin/pkexec" \
-        --replace "/bin/bash" "${bash}/bin/bash"
-      rm -rf "$packed"
-
-      # without this symlink loading JsChardet, the library that is used for auto encoding detection when files.autoGuessEncoding is true,
-      # fails to load with: electron/js2c/renderer_init: Error: Cannot find module 'jschardet'
-      # and the window immediately closes which renders VSCode unusable
-      # see https://github.com/NixOS/nixpkgs/issues/152939 for full log
-      ln -rs "$unpacked" "$packed"
-    '' + (let
-      vscodeRipgrep = if stdenv.isDarwin then
-        "Contents/Resources/app/node_modules.asar.unpacked/@vscode/ripgrep/bin/rg"
-      else
-        "resources/app/node_modules/@vscode/ripgrep/bin/rg";
-    in if !useVSCodeRipgrep then ''
-      rm ${vscodeRipgrep}
-      ln -s ${ripgrep}/bin/rg ${vscodeRipgrep}
-    '' else ''
-      chmod +x ${vscodeRipgrep}
-    '');
-
-    postFixup = lib.optionalString stdenv.isLinux ''
-      patchelf --add-needed ${libglvnd}/lib/libGLESv2.so.2 $out/lib/vscode/${executableName}
-    '';
-
-    inherit meta;
-  };
 
   # Vscode and variants allow for users to download and use extensions
   # which often include the usage of pre-built binaries.
@@ -169,7 +60,7 @@ let
   #
   # buildFHSEnv allows for users to use the existing vscode
   # extension tooling without significant pain.
-  fhs = { additionalPkgs ? pkgs: [] }: buildFHSEnv {
+  fhs = { additionalPkgs ? pkgs: [ ] }: buildFHSEnv {
     # also determines the name of the wrapped command
     name = executableName;
 
@@ -197,10 +88,10 @@ let
 
     # symlink shared assets, including icons and desktop entries
     extraInstallCommands = ''
-      ln -s "${unwrapped}/share" "$out/"
+      ln -s "${finalAttrs.finalPackage}/share" "$out/"
     '';
 
-    runScript = "${unwrapped}/bin/${executableName}";
+    runScript = "${finalAttrs.finalPackage}/bin/${executableName}";
 
     # vscode likes to kill the parent so that the
     # gui application isn't attached to the terminal session
@@ -208,7 +99,7 @@ let
 
     passthru = {
       inherit executableName;
-      inherit (unwrapped) pname version; # for home-manager module
+      inherit (finalAttrs.finalPackage) pname version; # for home-manager module
     };
 
     meta = meta // {
@@ -219,4 +110,145 @@ let
     };
   };
 in
-  unwrapped
+{
+
+  inherit pname version src sourceRoot dontFixup;
+
+  passthru = {
+    inherit executableName longName tests updateScript;
+    fhs = fhs { };
+    fhsWithPackages = f: fhs { additionalPkgs = f; };
+  } // lib.optionalAttrs (vscodeServer != null) {
+    inherit rev vscodeServer;
+  };
+
+  desktopItem = makeDesktopItem {
+    name = executableName;
+    desktopName = longName;
+    comment = "Code Editing. Redefined.";
+    genericName = "Text Editor";
+    exec = "${executableName} %F";
+    icon = "vs${executableName}";
+    startupNotify = true;
+    startupWMClass = shortName;
+    categories = [ "Utility" "TextEditor" "Development" "IDE" ];
+    mimeTypes = [ "text/plain" "inode/directory" ];
+    keywords = [ "vscode" ];
+    actions.new-empty-window = {
+      name = "New Empty Window";
+      exec = "${executableName} --new-window %F";
+      icon = "vs${executableName}";
+    };
+  };
+
+  urlHandlerDesktopItem = makeDesktopItem {
+    name = executableName + "-url-handler";
+    desktopName = longName + " - URL Handler";
+    comment = "Code Editing. Redefined.";
+    genericName = "Text Editor";
+    exec = executableName + " --open-url %U";
+    icon = "vs${executableName}";
+    startupNotify = true;
+    categories = [ "Utility" "TextEditor" "Development" "IDE" ];
+    mimeTypes = [ "x-scheme-handler/vscode" ];
+    keywords = [ "vscode" ];
+    noDisplay = true;
+  };
+
+  buildInputs = [ libsecret libXScrnSaver libxshmfence ]
+    ++ lib.optionals (!stdenv.isDarwin) [ alsa-lib at-spi2-atk libkrb5 mesa nss nspr systemd xorg.libxkbfile ];
+
+  runtimeDependencies = lib.optionals stdenv.isLinux [ (lib.getLib systemd) fontconfig.lib libdbusmenu wayland libsecret ];
+
+  nativeBuildInputs = [ unzip ]
+    ++ lib.optionals stdenv.isLinux [
+    autoPatchelfHook
+    asar
+    # override doesn't preserve splicing https://github.com/NixOS/nixpkgs/issues/132651
+    (buildPackages.wrapGAppsHook.override { inherit (buildPackages) makeWrapper; })
+  ];
+
+  dontBuild = true;
+  dontConfigure = true;
+  noDumpEnvVars = true;
+
+  installPhase = ''
+    runHook preInstall
+  '' + (if stdenv.isDarwin then ''
+    mkdir -p "$out/Applications/${longName}.app" "$out/bin"
+    cp -r ./* "$out/Applications/${longName}.app"
+    ln -s "$out/Applications/${longName}.app/Contents/Resources/app/bin/${sourceExecutableName}" "$out/bin/${executableName}"
+  '' else ''
+    mkdir -p "$out/lib/vscode" "$out/bin"
+    cp -r ./* "$out/lib/vscode"
+
+    ln -s "$out/lib/vscode/bin/${sourceExecutableName}" "$out/bin/${executableName}"
+
+    mkdir -p "$out/share/applications"
+    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"
+
+    # These are named vscode.png, vscode-insiders.png, etc to match the name in upstream *.deb packages.
+    mkdir -p "$out/share/pixmaps"
+    cp "$out/lib/vscode/resources/app/resources/linux/code.png" "$out/share/pixmaps/vs${executableName}.png"
+
+    # Override the previously determined VSCODE_PATH with the one we know to be correct
+    sed -i "/ELECTRON=/iVSCODE_PATH='$out/lib/vscode'" "$out/bin/${executableName}"
+    grep -q "VSCODE_PATH='$out/lib/vscode'" "$out/bin/${executableName}" # check if sed succeeded
+
+    # Remove native encryption code, as it derives the key from the executable path which does not work for us.
+    # The credentials should be stored in a secure keychain already, so the benefit of this is questionable
+    # in the first place.
+    rm -rf $out/lib/vscode/resources/app/node_modules/vscode-encrypt
+  '') + ''
+    runHook postInstall
+  '';
+
+  preFixup = ''
+    gappsWrapperArgs+=(
+      # Add gio to PATH so that moving files to the trash works when not using a desktop environment
+      --prefix PATH : ${glib.bin}/bin
+      --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}"
+      --add-flags ${lib.escapeShellArg commandLineArgs}
+    )
+  '';
+
+  # 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"
+    asar extract "$packed" "$unpacked"
+    substituteInPlace $unpacked/@vscode/sudo-prompt/index.js \
+      --replace "/usr/bin/pkexec" "/run/wrappers/bin/pkexec" \
+      --replace "/bin/bash" "${bash}/bin/bash"
+    rm -rf "$packed"
+
+    # without this symlink loading JsChardet, the library that is used for auto encoding detection when files.autoGuessEncoding is true,
+    # fails to load with: electron/js2c/renderer_init: Error: Cannot find module 'jschardet'
+    # and the window immediately closes which renders VSCode unusable
+    # see https://github.com/NixOS/nixpkgs/issues/152939 for full log
+    ln -rs "$unpacked" "$packed"
+  '' + (
+    let
+      vscodeRipgrep =
+        if stdenv.isDarwin then
+          "Contents/Resources/app/node_modules.asar.unpacked/@vscode/ripgrep/bin/rg"
+        else
+          "resources/app/node_modules/@vscode/ripgrep/bin/rg";
+    in
+    if !useVSCodeRipgrep then ''
+      rm ${vscodeRipgrep}
+      ln -s ${ripgrep}/bin/rg ${vscodeRipgrep}
+    '' else ''
+      chmod +x ${vscodeRipgrep}
+    ''
+  );
+
+  postFixup = lib.optionalString stdenv.isLinux ''
+    patchelf --add-needed ${libglvnd}/lib/libGLESv2.so.2 $out/lib/vscode/${executableName}
+  '';
+
+  inherit meta;
+})
diff --git a/nixpkgs/pkgs/applications/editors/vscode/vscode.nix b/nixpkgs/pkgs/applications/editors/vscode/vscode.nix
index 884aca67823b..185847e28028 100644
--- a/nixpkgs/pkgs/applications/editors/vscode/vscode.nix
+++ b/nixpkgs/pkgs/applications/editors/vscode/vscode.nix
@@ -30,21 +30,21 @@ let
   archive_fmt = if stdenv.isDarwin then "zip" else "tar.gz";
 
   sha256 = {
-    x86_64-linux = "0i6zk4zkwcw5lnzhg7vvnsw17nar97bbq3iishag9cpjqs9jpq4z";
-    x86_64-darwin = "1sy0ir4mhw9j5ifiv6d2928gcs8wfksxlsp312r9nsmc2h0i11g6";
-    aarch64-linux = "13lsycmia9yj6s7zf441vg8c0pipxpxdrnrj7v4rhjlvixjb8f8k";
-    aarch64-darwin = "1qwmwx0q05lzhsb8810kjk1lcw4wm7cr0zn7pkyjlsda0vkcc5g8";
-    armv7l-linux = "1hlnd9w141phrd3mzkhgiskbcnxqb05396frrv38pns007xhj103";
+    x86_64-linux = "1061hpazgs2gbn1xbn3in1sh7img71l5fx1irlgr86k70jdjw0qp";
+    x86_64-darwin = "17n16az3b8lnh1wq7mj4fd2kvvbh3l4d72iwxqx2z08vpsiaivad";
+    aarch64-linux = "0ggjh58nxwz5hlv4hwig2w32lcg2vsvszsr7dq6p7rd3c7l13mqr";
+    aarch64-darwin = "0irvjlzx79a2p8jbv8kiblkrzkslpv6qmqzi5yj7gl2dl2f5y1lx";
+    armv7l-linux = "1nyaz1nmswyy6qkz83cqb8nw1ajlhchqcwbj5msq3camkjdjr8g6";
   }.${system} or throwSystem;
 in
   callPackage ./generic.nix rec {
     # Please backport all compatible updates to the stable release.
     # This is important for the extension ecosystem.
-    version = "1.82.2";
+    version = "1.83.1";
     pname = "vscode" + lib.optionalString isInsiders "-insiders";
 
     # This is used for VS Code - Remote SSH test
-    rev = "abd2f3db4bdb28f9e95536dfa84d8479f1eb312d";
+    rev = "f1b07bd25dfad64b0167beb15359ae573aecd2cc";
 
     executableName = "code" + lib.optionalString isInsiders "-insiders";
     longName = "Visual Studio Code" + lib.optionalString isInsiders " - Insiders";
@@ -68,7 +68,7 @@ in
       src = fetchurl {
         name = "vscode-server-${rev}.tar.gz";
         url = "https://update.code.visualstudio.com/commit:${rev}/server-linux-x64/stable";
-        sha256 = "1d1ypmasr7zj4csinb5nj531ckj7a1pgn36469fdzwn0xjrgkg16";
+        sha256 = "0hbqbkzynqxp99rhqq46878cp1jnjklqy8vgbf0dm2cwfw86jbrw";
       };
     };
 
diff --git a/nixpkgs/pkgs/applications/editors/vscode/vscodium.nix b/nixpkgs/pkgs/applications/editors/vscode/vscodium.nix
index f7527096f17a..c34629a3cf67 100644
--- a/nixpkgs/pkgs/applications/editors/vscode/vscodium.nix
+++ b/nixpkgs/pkgs/applications/editors/vscode/vscodium.nix
@@ -15,11 +15,11 @@ let
   archive_fmt = if stdenv.isDarwin then "zip" else "tar.gz";
 
   sha256 = {
-    x86_64-linux = "1xzmfvkzqfxblahi2pc54fr7i6rynqm76p4wpbfzxrrh5a3xjwn3";
-    x86_64-darwin = "0lp6yqwqwfngl98nba8f77yypb44cfn7kcjhbc93s8kqd57m97zj";
-    aarch64-linux = "1hpwjdbfc8l4a7ln50s6h68abcb6djcc5y0h686s9k5v2axm7f3v";
-    aarch64-darwin = "0cbms9p8g2gjx9wmm78fzlscw62qasjv30al8v39bda3k694wnh5";
-    armv7l-linux = "0hvaray6b36j8s0fvffnkbsw7kf2rn2z4y8q4wlnqx3hfyalcvcn";
+    x86_64-linux = "0cqkxd4pywkrvg3b96f1dyain6vlrb3di8a0yskmq3h58qd6k8rc";
+    x86_64-darwin = "09y3whpp2z8fgb42pb9lw0b4wn0np3rdjkn5l1kldjljfrcwcn9g";
+    aarch64-linux = "1kh8qylj77km8jhmx9a2bck7y4bb0fjx46sll7swagxz27b8ahi0";
+    aarch64-darwin = "14g60sx3c5m02ly880sxwhmzvpxqw4pfij2ibgyprzdlpap0r2b0";
+    armv7l-linux = "1s4rpd5p4kwmi89cml1106l9dccdwnqq3lyr8ym781pj9p75i8wp";
   }.${system} or throwSystem;
 
   sourceRoot = lib.optionalString (!stdenv.isDarwin) ".";
@@ -29,7 +29,7 @@ in
 
     # Please backport all compatible updates to the stable release.
     # This is important for the extension ecosystem.
-    version = "1.82.2.23257";
+    version = "1.83.1.23285";
     pname = "vscodium";
 
     executableName = "codium";