From 8dd10125a5215c1a2ff1b677b929e9f250b7438e Mon Sep 17 00:00:00 2001 From: Thibault Gagnaux Date: Tue, 4 Jul 2023 21:54:27 +0200 Subject: [PATCH 1/4] vscode: fix vscode-insiders on darwin --- pkgs/applications/editors/vscode/generic.nix | 6 +----- pkgs/applications/editors/vscode/vscode.nix | 8 +++++++- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/pkgs/applications/editors/vscode/generic.nix b/pkgs/applications/editors/vscode/generic.nix index 0b30d44908d8..e9d6a51c7b8b 100644 --- a/pkgs/applications/editors/vscode/generic.nix +++ b/pkgs/applications/editors/vscode/generic.nix @@ -12,14 +12,10 @@ # Attributes inherit from specific versions , version, src, meta, sourceRoot, commandLineArgs -, executableName, longName, shortName, pname, updateScript +, executableName, longName, shortName, pname, updateScript, sourceExecutableName , 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..5d315354cd6f 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 04-07-2023. +, sourceExecutableName ? "code" + lib.optionalString (isInsiders && stdenv.isLinux) "-insiders" , commandLineArgs ? "" , useVSCodeRipgrep ? stdenv.isDarwin }: @@ -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}"; From bfdba5995dc5d910edbde77c7380766cd06f7029 Mon Sep 17 00:00:00 2001 From: Thibault Gagnaux Date: Wed, 5 Jul 2023 15:46:09 +0200 Subject: [PATCH 2/4] vscode: set vscode-insiders package name if is insiders --- pkgs/applications/editors/vscode/vscode.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/editors/vscode/vscode.nix b/pkgs/applications/editors/vscode/vscode.nix index 5d315354cd6f..6f8f5fef4ecc 100644 --- a/pkgs/applications/editors/vscode/vscode.nix +++ b/pkgs/applications/editors/vscode/vscode.nix @@ -41,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"; From bb9e80b6f34a76592d044fc8282b82943d594570 Mon Sep 17 00:00:00 2001 From: Thibault Gagnaux Date: Sat, 5 Aug 2023 14:49:10 -0500 Subject: [PATCH 3/4] vscode: fix eval-breaking package outputs --- pkgs/applications/editors/vscode/generic.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/editors/vscode/generic.nix b/pkgs/applications/editors/vscode/generic.nix index e9d6a51c7b8b..532b04ea5545 100644 --- a/pkgs/applications/editors/vscode/generic.nix +++ b/pkgs/applications/editors/vscode/generic.nix @@ -12,10 +12,10 @@ # Attributes inherit from specific versions , version, src, meta, sourceRoot, commandLineArgs -, executableName, longName, shortName, pname, updateScript, sourceExecutableName +, executableName, longName, shortName, pname, updateScript , dontFixup ? false , rev ? null, vscodeServer ? null - +, sourceExecutableName ? executableName , useVSCodeRipgrep ? false , ripgrep }: From abed19535ad430f5181358523fda357db83d6970 Mon Sep 17 00:00:00 2001 From: Thibault Gagnaux Date: Sat, 5 Aug 2023 21:50:05 -0500 Subject: [PATCH 4/4] vscode: use iso date in comment --- pkgs/applications/editors/vscode/vscode.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/editors/vscode/vscode.nix b/pkgs/applications/editors/vscode/vscode.nix index 6f8f5fef4ecc..0b0739d5ac2b 100644 --- a/pkgs/applications/editors/vscode/vscode.nix +++ b/pkgs/applications/editors/vscode/vscode.nix @@ -9,7 +9,7 @@ # 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 04-07-2023. +# of 2023-08-06. , sourceExecutableName ? "code" + lib.optionalString (isInsiders && stdenv.isLinux) "-insiders" , commandLineArgs ? "" , useVSCodeRipgrep ? stdenv.isDarwin