diff --git a/pkgs/applications/editors/vscode/generic.nix b/pkgs/applications/editors/vscode/generic.nix index 0b30d44908d8..532b04ea5545 100644 --- a/pkgs/applications/editors/vscode/generic.nix +++ b/pkgs/applications/editors/vscode/generic.nix @@ -15,11 +15,7 @@ , executableName, longName, shortName, pname, updateScript , dontFixup ? false , rev ? null, vscodeServer ? null - -# sourceExecutableName is the name of the binary in the source archive, over -# which we have no control , sourceExecutableName ? executableName - , useVSCodeRipgrep ? false , ripgrep }: diff --git a/pkgs/applications/editors/vscode/vscode.nix b/pkgs/applications/editors/vscode/vscode.nix index 95123502295e..0b0739d5ac2b 100644 --- a/pkgs/applications/editors/vscode/vscode.nix +++ b/pkgs/applications/editors/vscode/vscode.nix @@ -5,6 +5,12 @@ , nixosTests , srcOnly , isInsiders ? false +# sourceExecutableName is the name of the binary in the source archive over +# which we have no control and it is needed to run the insider version as +# documented in https://nixos.wiki/wiki/Visual_Studio_Code#Insiders_Build +# On MacOS the insider binary is still called code instead of code-insiders as +# of 2023-08-06. +, sourceExecutableName ? "code" + lib.optionalString (isInsiders && stdenv.isLinux) "-insiders" , commandLineArgs ? "" , useVSCodeRipgrep ? stdenv.isDarwin }: @@ -35,7 +41,7 @@ in # Please backport all compatible updates to the stable release. # This is important for the extension ecosystem. version = "1.81.0"; - pname = "vscode"; + pname = "vscode" + lib.optionalString isInsiders "-insiders"; # This is used for VS Code - Remote SSH test rev = "6445d93c81ebe42c4cbd7a60712e0b17d9463e97"; @@ -43,7 +49,7 @@ in executableName = "code" + lib.optionalString isInsiders "-insiders"; longName = "Visual Studio Code" + lib.optionalString isInsiders " - Insiders"; shortName = "Code" + lib.optionalString isInsiders " - Insiders"; - inherit commandLineArgs useVSCodeRipgrep; + inherit commandLineArgs useVSCodeRipgrep sourceExecutableName; src = fetchurl { name = "VSCode_${version}_${plat}.${archive_fmt}";