nodejs builder: fix executing $buildScript

This commit is contained in:
DavHau 2021-11-15 18:09:24 +07:00
parent f1e34e0e89
commit 079ec025dc
2 changed files with 3 additions and 9 deletions

View File

@ -267,9 +267,9 @@ let
# execute install command
if [ -n "$buildScript" ]; then
if [ -f "$buildScript" ]; then
exec $buildScript
$buildScript
else
echo "$buildScript" | bash
eval "$buildScript"
fi
# by default, only for top level packages, `npm run build` is executed
elif [ -n "$runBuild" ] && [ "$(jq '.scripts.build' ./package.json)" != "null" ]; then
@ -308,12 +308,6 @@ let
});
in
pkg;
# apply packageOverrides to current derivation
# (utils.applyOverridesToPackage {
# inherit outputs pkg;
# conditionalOverrides = packageOverrides;
# pname = name;
# });
in
outputs

View File

@ -159,7 +159,7 @@ let
if b.length applicableFuncs == 0 then
"overrideAttrs"
else if b.length applicableFuncs > 1 then
throwErrorUnclearAttributeOverride Hpname condOverride._name attrName
throwErrorUnclearAttributeOverride pname condOverride._name attrName
else
b.elemAt applicableFuncs 0;