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 | |
parent | 826b271d9aead1a0f8e1678e7c2814066fffb983 (diff) |
Added local best-effort builds (i.e. one failure does not ruin all packages you would like to see built)
-rwxr-xr-x | scripts/nix-http-export.cgi.in | 2 | ||||
-rw-r--r-- | scripts/nix-reduce-build.in | 18 |
2 files changed, 17 insertions, 3 deletions
diff --git a/scripts/nix-http-export.cgi.in b/scripts/nix-http-export.cgi.in index ac28260d9..db2fe78b4 100755 --- a/scripts/nix-http-export.cgi.in +++ b/scripts/nix-http-export.cgi.in @@ -16,7 +16,7 @@ needed_path="$(echo $needed_path | sed -e 's/%2B/+/g; s/%3D/=/g')" echo needed_path: "$needed_path" >&2 -NIX_STORE="${NIX_STORE:-/nix/store}" +NIX_STORE="${NIX_STORE_DIR:-/nix/store}" echo NIX_STORE: "${NIX_STORE}" >&2 diff --git a/scripts/nix-reduce-build.in b/scripts/nix-reduce-build.in index 1dcc0ac4e..444499d0e 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; |