1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-07 01:51:47 +02:00

* A utility script `nix-build' that builds Nix expressions and prints

their output paths (and only that) on standard output.
This commit is contained in:
Eelco Dolstra 2004-06-22 15:12:34 +00:00
parent b302e5f63b
commit 3093af58a7
2 changed files with 30 additions and 6 deletions

23
scripts/nix-build.in Executable file
View file

@ -0,0 +1,23 @@
#! @shell@ -e
nixExpr=$1
if test -z "$nixExpr"; then
echo "syntax: $0 NIX-EXPR..." >&2
exit 1
fi
extraArgs=
for i in "$@"; do
case "$i" in
-*)
extraArgs="$extraArgs $i"
;;
*)
storeExpr=$(nix-instantiate "$i")
echo "store expression is $storeExpr" >&2
nix-store -qnfv $extraArgs $storeExpr
;;
esac
done