diff options
Diffstat (limited to 'scripts/nix-build.in')
-rwxr-xr-x | scripts/nix-build.in | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/scripts/nix-build.in b/scripts/nix-build.in new file mode 100755 index 000000000000..a50901135ed6 --- /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 |