-
-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
milahu
committed
Sep 2, 2021
1 parent
d0c89d1
commit 3970a1b
Showing
1 changed file
with
16 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -365,7 +365,8 @@ rec { | |
if grep -I -q -r '/bin/' .; then | ||
source $TMP/preinstall-env | ||
patchShebangs . | ||
patchShebangs . | tail -n+2 | ||
# tail -n+2: remove output "patching script interpreter paths in ." (DIRTY) | ||
fi | ||
''; | ||
executable = true; | ||
|
@@ -401,11 +402,24 @@ rec { | |
|
||
buildPhase = '' | ||
runHook preBuild | ||
# DEBUG | ||
#set -o xtrace # print all commands | ||
#cat package-lock.json | jq -r | ||
#cat package.json | jq -r | ||
mkdir -p node_modules/.hooks | ||
declare -pf > $TMP/preinstall-env | ||
ln -s ${preinstall_node_modules}/node_modules/.hooks/prepare node_modules/.hooks/preinstall | ||
export HOME=. | ||
npm install --offline --nodedir=${nodeSource nodejs} | ||
# npm --silent: remove npm "trace" output: | ||
# > [email protected] preinstall /build/node_modules/some-package | ||
# > /build/node_modules/.hooks/preinstall | ||
# | ||
echo "run 'npm install' ..." | ||
npm --silent install --offline --nodedir=${nodeSource nodejs} | ||
test -d node_modules/.bin && patchShebangs node_modules/.bin | ||
rm -rf node_modules/.hooks | ||
runHook postBuild | ||
|