Skip to content

Commit

Permalink
agent-js-monorepo does npm install --ignore scripts once before regul…
Browse files Browse the repository at this point in the history
…ar install, allowing for patchShebangs
  • Loading branch information
gobengo committed Sep 9, 2020
1 parent 45fc2e8 commit 088fe36
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions nix/agent-js/agent-js-monorepo.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@ let
configureScript = builtins.toFile "tmp-nix-configure.sh" ''
export HOME=$(mktemp -d)
'';
npmCommands = [
# Do this with --ignore-scripts to ensure we fetch deps, but don't trigger any npm scripts.
# This is to allow for npm scripts that depend on dep's npm bin scripts.
# Those scripts may have shebangs in them, and nix can only patchShebangs after each command.
# So we fetch deps, let it patchShebangs, and then npm install again w/ postinstall scripts
"npm install --ignore-scripts"
"npm install"
];
installPhase = ''
# $out: Everything!
mkdir -p $out
Expand Down

0 comments on commit 088fe36

Please sign in to comment.