#!/bin/sh NIXPKGS='' NIX='' while getopts "f:" arg; do case ${arg} in f) NIXPKGS="${OPTARG}/maintainers/scripts/find-tarballs.nix" NIX="${OPTARG}" shift shift ;; h) echo "$0 [-f path_to_nixpkgs] package1 ..." exit 2 ;; esac done if [ $# -eq 0 ] then echo "you need to pass packages" exit 1 fi echo "DOWNLOADING SOURCES TO BUILD $@" > /dev/stderr mkdir -p "distfiles" nix-instantiate --json --eval --strict "${NIXPKGS}" --arg expr "with import ${NIX}{}; [$*]" # | ./mirror.pl