mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-29 02:13:23 +00:00
Merge pull request #6215 from valeriangalliat/npm-engine-fix
Patch npm packages to ignore npm requirements
This commit is contained in:
commit
168b7bee6f
@ -83,6 +83,9 @@ let
|
||||
# Some version specifiers (latest, unstable, URLs, file paths) force NPM
|
||||
# to make remote connections or consult paths outside the Nix store.
|
||||
# The following JavaScript replaces these by * to prevent that:
|
||||
# Also some packages require a specific npm version because npm may
|
||||
# resovle dependencies differently, but npm is not used by Nix for dependency
|
||||
# reslution, so these requirements are dropped.
|
||||
|
||||
(
|
||||
cat <<EOF
|
||||
@ -131,6 +134,11 @@ let
|
||||
}
|
||||
}
|
||||
|
||||
/* Ignore npm version requirement */
|
||||
if(packageObj.engines) {
|
||||
delete packageObj.engines.npm;
|
||||
}
|
||||
|
||||
/* Write the fixed JSON file */
|
||||
fs.writeFileSync("package.json", JSON.stringify(packageObj));
|
||||
EOF
|
||||
|
Loading…
Reference in New Issue
Block a user