Merge pull request #6215 from valeriangalliat/npm-engine-fix

Patch npm packages to ignore npm requirements
This commit is contained in:
Jaka Hudoklin 2015-02-07 14:42:59 +00:00
commit 168b7bee6f

View File

@ -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