mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-25 23:36:16 +02:00
25 lines
459 B
Text
Executable file
25 lines
459 B
Text
Executable file
#! @shell@ -e
|
|
|
|
nixExpr=$1
|
|
|
|
if test -z "$nixExpr"; then
|
|
echo "syntax: $0 NIX-EXPR..." >&2
|
|
exit 1
|
|
fi
|
|
|
|
extraArgs=
|
|
|
|
for i in "$@"; do
|
|
case "$i" in
|
|
-*)
|
|
extraArgs="$extraArgs $i"
|
|
;;
|
|
*)
|
|
storeExpr=$(nix-instantiate "$i")
|
|
for j in $storeExpr; do
|
|
echo "store expression is $j" >&2
|
|
done
|
|
nix-store -qnfv $extraArgs $storeExpr
|
|
;;
|
|
esac
|
|
done
|