From 3093af58a7e9d3f0315a1a1040d3cfeaea051ba6 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 22 Jun 2004 15:12:34 +0000 Subject: * A utility script `nix-build' that builds Nix expressions and prints their output paths (and only that) on standard output. --- scripts/nix-build.in | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 scripts/nix-build.in (limited to 'scripts/nix-build.in') diff --git a/scripts/nix-build.in b/scripts/nix-build.in new file mode 100755 index 000000000..a50901135 --- /dev/null +++ b/scripts/nix-build.in @@ -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 -- cgit v1.2.3