Barf on non-existant build inputs
Previously saying buildInputs = [ "bla" ]; was quietly ignored. Now it's a fatal error.
This commit is contained in:
parent
41e1900ea1
commit
42d94b6f15
|
@ -222,7 +222,7 @@ runHook addInputsHook
|
||||||
|
|
||||||
# Recursively find all build inputs.
|
# Recursively find all build inputs.
|
||||||
findInputs() {
|
findInputs() {
|
||||||
local pkg=$1
|
local pkg="$1"
|
||||||
local var=$2
|
local var=$2
|
||||||
local propagatedBuildInputsFile=$3
|
local propagatedBuildInputsFile=$3
|
||||||
|
|
||||||
|
@ -234,17 +234,22 @@ findInputs() {
|
||||||
|
|
||||||
eval $var="'${!var} $pkg '"
|
eval $var="'${!var} $pkg '"
|
||||||
|
|
||||||
if [ -f $pkg ]; then
|
if ! [ -e "$pkg" ]; then
|
||||||
source $pkg
|
echo "build input $pkg does not exist" >&2
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f $pkg/nix-support/setup-hook ]; then
|
if [ -f "$pkg" ]; then
|
||||||
source $pkg/nix-support/setup-hook
|
source "$pkg"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f $pkg/nix-support/$propagatedBuildInputsFile ]; then
|
if [ -f "$pkg/nix-support/setup-hook" ]; then
|
||||||
for i in $(cat $pkg/nix-support/$propagatedBuildInputsFile); do
|
source "$pkg/nix-support/setup-hook"
|
||||||
findInputs $i $var $propagatedBuildInputsFile
|
fi
|
||||||
|
|
||||||
|
if [ -f "$pkg/nix-support/$propagatedBuildInputsFile" ]; then
|
||||||
|
for i in $(cat "$pkg/nix-support/$propagatedBuildInputsFile"); do
|
||||||
|
findInputs "$i" $var $propagatedBuildInputsFile
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue