mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-18 19:51:17 +00:00
vscode-js-debug: fix missing jq in postPatch
Fixes #320507. The `npmConfigHook` used by `buildNpmPackage` does not correctly propagate the `nativeBuildInputs` into its `PATH`, which is why `jq` was not available during the patch phase. Since this `npmConfigHook` is run as part of a fixed-output derivation (`fetchNpmDeps`), if it had already been realised, unless its hash had changed, a missing `jq` would not be noticed, on a rebuild of `vscode-js-debug`. The `postPatch` hook is *also* run during `buildNpmPackage`, but there the `nativeBuildInputs` were correctly added to the `PATH`, which is why a rebuild of `vscode-js-debug` with the previous `postPatch` would succeed (if its `npmDeps`'s hash hadn't changed).
This commit is contained in:
parent
b60ebf54c1
commit
f4423979de
|
@ -1,7 +1,7 @@
|
|||
{ lib
|
||||
, buildNpmPackage
|
||||
, fetchFromGitHub
|
||||
, jq
|
||||
, buildPackages
|
||||
, libsecret
|
||||
, pkg-config
|
||||
, nodePackages
|
||||
|
@ -23,12 +23,12 @@ buildNpmPackage rec {
|
|||
|
||||
npmDepsHash = "sha256-DfeaiqKadTnGzOObK01ctlavwqTMa0tqn59sLZMPvUM=";
|
||||
|
||||
nativeBuildInputs = [ pkg-config nodePackages.node-gyp jq ];
|
||||
nativeBuildInputs = [ pkg-config nodePackages.node-gyp ];
|
||||
|
||||
buildInputs = [ libsecret ];
|
||||
|
||||
postPatch = ''
|
||||
jq '
|
||||
${lib.getExe buildPackages.jq} '
|
||||
.scripts.postinstall |= empty | # tries to install playwright, not necessary for build
|
||||
.scripts.build |= "gulp dapDebugServer" | # there is no build script defined
|
||||
.bin |= "./dist/src/dapDebugServer.js" # there is no bin output defined
|
||||
|
|
Loading…
Reference in a new issue