* 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:
parent
b302e5f63b
commit
3093af58a7
|
@ -1,6 +1,6 @@
|
|||
bin_SCRIPTS = nix-collect-garbage \
|
||||
nix-pull nix-push nix-prefetch-url \
|
||||
nix-install-package nix-channel
|
||||
nix-pull nix-push nix-prefetch-url \
|
||||
nix-install-package nix-channel nix-build
|
||||
|
||||
noinst_SCRIPTS = nix-profile.sh
|
||||
|
||||
|
@ -18,7 +18,8 @@ install-exec-local: readmanifest.pm
|
|||
include ../substitute.mk
|
||||
|
||||
EXTRA_DIST = nix-collect-garbage.in \
|
||||
nix-pull.in nix-push.in nix-profile.sh.in \
|
||||
nix-prefetch-url.in nix-install-package.in \
|
||||
nix-channel.in \
|
||||
prebuilts.conf readmanifest.pm.in
|
||||
nix-pull.in nix-push.in nix-profile.sh.in \
|
||||
nix-prefetch-url.in nix-install-package.in \
|
||||
nix-channel.in \
|
||||
prebuilts.conf readmanifest.pm.in \
|
||||
nix-build.in
|
||||
|
|
23
scripts/nix-build.in
Executable file
23
scripts/nix-build.in
Executable 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
|
Loading…
Reference in a new issue