vscode: fix vsce-sign integrity check

Extension updates fail with signature verification errors since
1.125, because auto-patchelf messes up the vsce-sign binary somehow.

Instead, just copy the original back into place after all the fixups,
and do the smallest amount of patchelfing possible.

(also it's dotnet, not node)
This commit is contained in:
K900
2026-07-02 12:14:42 +03:00
parent f42881a656
commit d1d7a14e58
+3 -6
View File
@@ -308,11 +308,6 @@ stdenv.mkDerivation (
dontConfigure = true;
noDumpEnvVars = true;
stripExclude = lib.optional hasVsceSign [
# vsce-sign is a single executable application built with Node.js, and it becomes non-functional if stripped
"lib/vscode/resources/app/node_modules/@vscode/vsce-sign/bin/vsce-sign"
];
installPhase = ''
runHook preInstall
''
@@ -474,9 +469,11 @@ stdenv.mkDerivation (
--add-needed ${libglvnd}/lib/libEGL.so.1 \
$out/lib/${libraryName}/${executableName}
''
# restore original vsce-sign, which has integrity checks
+ (lib.optionalString hasVsceSign ''
cp -r ./resources/app/node_modules/@vscode/vsce-sign/bin/vsce-sign "$out/lib/vscode/resources/app/node_modules/@vscode/vsce-sign/bin/vsce-sign"
patchelf \
--add-needed ${lib.getLib openssl}/lib/libssl.so \
--add-needed ${lib.getLib openssl}/lib/libssl.so.3 \
$out/lib/vscode/resources/app/node_modules/@vscode/vsce-sign/bin/vsce-sign
'')
);