Commit 8f384467 authored by Francis Gagné's avatar Francis Gagné
Browse files

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.
parent 55499d86
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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;