mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 23:13:19 +00:00
vscode-with-extensions: fix insiders build
Extensions are no longer unwrapped to the /share directory so the extensions' derivations do not have to know about VSCode's package name.
This commit is contained in:
parent
1c40ee6fc4
commit
bb24fafbfa
@ -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}"
|
||||
''}
|
||||
''
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user