nixpkgs should be the one provided in the command line

This commit is contained in:
Solene Rapenne 2022-08-31 17:37:26 +02:00
parent bf5b27e9c0
commit c6258630dd
1 changed files with 3 additions and 1 deletions

4
run.sh
View File

@ -1,11 +1,13 @@
#!/bin/sh
NIXPKGS='<nixpkgs/maintainers/scripts/find-tarballs.nix>'
NIX='<nixpkgs>'
while getopts "f:" arg; do
case ${arg} in
f)
NIXPKGS="${OPTARG}/maintainers/scripts/find-tarballs.nix"
NIX="${OPTARG}"
shift
shift
;;
@ -24,4 +26,4 @@ fi
echo "DOWNLOADING SOURCES TO BUILD $@" > /dev/stderr
mkdir -p "distfiles"
nix-instantiate --json --eval --strict "${NIXPKGS}" --arg expr "with import <nixpkgs>{}; [$*]" # | ./mirror.pl
nix-instantiate --json --eval --strict "${NIXPKGS}" --arg expr "with import ${NIX}{}; [$*]" # | ./mirror.pl