3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #71251 from hyperfekt/vscode-insiders-extensions

vscode-with-extensions: fix insiders build
This commit is contained in:
Dmitry Kalinkin 2020-03-07 13:33:07 -05:00 committed by GitHub
commit a2437c37af
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 9 deletions

View file

@ -48,7 +48,7 @@ let
wrappedPkgName = lib.removeSuffix "-${wrappedPkgVersion}" vscode.name;
combinedExtensionsDrv = buildEnv {
name = "${wrappedPkgName}-extensions-${wrappedPkgVersion}";
name = "vscode-extensions";
paths = vscodeExtensions;
};
@ -70,6 +70,6 @@ runCommand "${wrappedPkgName}-with-extensions-${wrappedPkgVersion}" {
ln -sT "${vscode}/share/applications/${executableName}.desktop" "$out/share/applications/${executableName}.desktop"
ln -sT "${vscode}/share/applications/${executableName}-url-handler.desktop" "$out/share/applications/${executableName}-url-handler.desktop"
makeWrapper "${vscode}/bin/${executableName}" "$out/bin/${executableName}" ${lib.optionalString (vscodeExtensions != []) ''
--add-flags "--extensions-dir ${combinedExtensionsDrv}/share/${wrappedPkgName}/extensions"
--add-flags "--extensions-dir ${combinedExtensionsDrv}"
''}
''

View file

@ -1,9 +1,6 @@
{ stdenv, lib, fetchurl, vscode, unzip }:
{ stdenv, lib, fetchurl, unzip }:
let
extendedPkgVersion = lib.getVersion vscode;
extendedPkgName = lib.removeSuffix "-${extendedPkgVersion}" vscode.name;
mktplcExtRefToFetchArgs = ext: {
url = "https://${ext.publisher}.gallery.vsassets.io/_apis/public/gallery/publisher/${ext.publisher}/extension/${ext.name}/${ext.version}/assetbyname/Microsoft.VisualStudio.Services.VSIXPackage";
sha256 = ext.sha256;
@ -14,7 +11,6 @@ let
buildVscodeExtension = a@{
name,
namePrefix ? "${extendedPkgName}-extension-",
src,
# Same as "Unique Identifier" on the extension's web page.
# For the moment, only serve as unique extension dir.
@ -28,12 +24,12 @@ let
}:
stdenv.mkDerivation ((removeAttrs a [ "vscodeExtUniqueId" ]) // {
name = namePrefix + name;
name = "vscode-extension-${name}";
inherit vscodeExtUniqueId;
inherit configurePhase buildPhase dontPatchELF dontStrip;
installPrefix = "share/${extendedPkgName}/extensions/${vscodeExtUniqueId}";
installPrefix = "${vscodeExtUniqueId}";
buildInputs = [ unzip ] ++ buildInputs;