mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-26 07:46:21 +02:00
Added support for file:// archive (.nar.gz) repositories to nix-reduce-build. /tmp/nix-export created by nix-http-export.cgi is OK.
This commit is contained in:
parent
b4bc8b7616
commit
9819bb20da
1 changed files with 5 additions and 0 deletions
|
@ -59,6 +59,7 @@ for i in "$@"; do
|
||||||
sshHost="${i#ssh://}";
|
sshHost="${i#ssh://}";
|
||||||
httpHost="${i#http://}";
|
httpHost="${i#http://}";
|
||||||
httpsHost="${i#https://}";
|
httpsHost="${i#https://}";
|
||||||
|
filePath="${i#file:/}";
|
||||||
if [ "$i" != "$sshHost" ]; then
|
if [ "$i" != "$sshHost" ]; then
|
||||||
cat needed-paths | while read; do
|
cat needed-paths | while read; do
|
||||||
nix-copy-closure --from "$sshHost" --gzip "$REPLY" </dev/null || true;
|
nix-copy-closure --from "$sshHost" --gzip "$REPLY" </dev/null || true;
|
||||||
|
@ -67,6 +68,10 @@ for i in "$@"; do
|
||||||
cat needed-paths | while read; do
|
cat needed-paths | while read; do
|
||||||
curl ${BAD_CERTIFICATE:+-k} -L "$i${REPLY##*/}" | gunzip | nix-store --import;
|
curl ${BAD_CERTIFICATE:+-k} -L "$i${REPLY##*/}" | gunzip | nix-store --import;
|
||||||
done;
|
done;
|
||||||
|
elif [ "$i" != "filePath" ] ; then
|
||||||
|
cat needed-paths | while read; do
|
||||||
|
gunzip < "$filePath/${REPLY##*/}".nar.gz | nix-store --import;
|
||||||
|
done;
|
||||||
fi;
|
fi;
|
||||||
mv needed-paths wanted-paths;
|
mv needed-paths wanted-paths;
|
||||||
cat wanted-paths | xargs nix-store --check-validity --print-invalid > needed-paths;
|
cat wanted-paths | xargs nix-store --check-validity --print-invalid > needed-paths;
|
||||||
|
|
Loading…
Reference in a new issue