diff options
author | Michael Raskin <7c6f434c@mail.ru> | 2008-06-14 08:30:35 +0000 |
---|---|---|
committer | Michael Raskin <7c6f434c@mail.ru> | 2008-06-14 08:30:35 +0000 |
commit | 18e27629d301ceef4c6f896f22197f8daee24da3 (patch) | |
tree | 70dc09396a22652e73c662e637c4ee698866898c /scripts/nix-reduce-build.in | |
parent | 826b271d9aead1a0f8e1678e7c2814066fffb983 (diff) | |
download | guix-18e27629d301ceef4c6f896f22197f8daee24da3.tar.gz |
Added local best-effort builds (i.e. one failure does not ruin all packages you would like to see built)
Diffstat (limited to 'scripts/nix-reduce-build.in')
-rw-r--r-- | scripts/nix-reduce-build.in | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/scripts/nix-reduce-build.in b/scripts/nix-reduce-build.in index 1dcc0ac4e2..444499d0e4 100644 --- a/scripts/nix-reduce-build.in +++ b/scripts/nix-reduce-build.in @@ -16,6 +16,10 @@ if test -z "$1" || test "a--help" = "a$1" ; then echo " Or all together: " >&2 echo -e nix-reduce-build /expr.nix /e2.nix -- \\\\\\\n\ " ssh://a@b.example.com http://n.example.com/get-nar?q= file://nar/" >&2 + echo " Also supports best-effort local builds of failing expression set:" >&2 + echo "nix-reduce-build /e.nix -- nix-daemon:// nix-self://" >&2 + echo " nix-daemon:// builds using daemon" + echo " nix-self:// builds directly using nix-store from current installation" >&2 exit; fi; @@ -28,7 +32,7 @@ echo Will work on $(cat initial | wc -l) targets. >&2 while read ; do case "$REPLY" in - ${NIX_STORE_PATH:-/nix/store}/*) + ${NIX_STORE_DIR:-/nix/store}/*) echo "$REPLY" >> paths; >&2 ;; *) @@ -79,11 +83,21 @@ for i in "$@"; do echo "Getting $REPLY over http/https" >&2 curl ${BAD_CERTIFICATE:+-k} -L "$i${REPLY##*/}" | gunzip | nix-store --import; done; - elif [ "$i" != "filePath" ] ; then + elif [ "$i" != "$filePath" ] ; then cat needed-paths | while read; do echo "Installing $REPLY from file" >&2 gunzip < "$filePath/${REPLY##*/}".nar.gz | nix-store --import; done; + elif [ "$i" = "nix-daemon://" ] ; then + cat needed-paths | while read ; do + echo "Building $REPLY using nix-daemon" >&2 + NIX_REMOTE=daemon @bindir@/nix-store -r "${NIX_STORE_DIR:-/nix/store}/${REPLY##*/}" + done; + elif [ "$i" = "nix-self://" ] ; then + cat needed-paths | while read ; do + echo "Building $REPLY using direct Nix build" >&2 + NIX_REMOTE= @bindir@/nix-store -r "${NIX_STORE_DIR:-/nix/store}/${REPLY##*/}" + done; fi; mv needed-paths wanted-paths; cat wanted-paths | xargs nix-store --check-validity --print-invalid > needed-paths; |