Allow buildInputs to be regular files

If a build input is a regular file, use it as a setup hook. This makes
setup hooks more efficient to create: you don't need a derivation that
copies them to $out/nix-support/setup-hook, instead you can use the
file as is.
This commit is contained in:
Eelco Dolstra 2014-06-25 17:01:29 +02:00
parent 0a8605ded1
commit b23dbb1a5d

View File

@ -198,6 +198,10 @@ findInputs() {
eval $var="'${!var} $pkg '"
if [ -f $pkg ]; then
source $pkg
fi
if [ -f $pkg/nix-support/setup-hook ]; then
source $pkg/nix-support/setup-hook
fi