vscode: fix vscode-insiders on darwin

This commit is contained in:
Thibault Gagnaux 2023-07-04 21:54:27 +02:00
parent 3a099a65fd
commit 8dd10125a5
No known key found for this signature in database
GPG Key ID: 44BD0764ACAE8E25
2 changed files with 8 additions and 6 deletions

View File

@ -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
}:

View File

@ -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}";