vscode-utils: Set the sourceRoot attribute on vscode extensions

Some extensions contain directories other than `extension` (e.g.,
`package`, if the extension has a digital signature). The unpacker phase
fails if a .vsix file contains more than one directory at the archive's
root and the `sourceRoot` attribute is unset.

(cherry picked from commit 8f384467cc)
This commit is contained in:
Francis Gagné
2024-02-18 03:31:29 -05:00
committed by github-actions[bot]
parent 4e9021f785
commit a4955cdc4c

View File

@@ -32,6 +32,10 @@ let
inherit configurePhase buildPhase dontPatchELF dontStrip;
# Some .vsix files contain other directories (e.g., `package`) that we don't use.
# If other directories are present but `sourceRoot` is unset, the unpacker phase fails.
sourceRoot = "extension";
installPrefix = "share/vscode/extensions/${vscodeExtUniqueId}";
nativeBuildInputs = [ unzip ] ++ nativeBuildInputs;