8 lines
286 B
Plaintext
8 lines
286 B
Plaintext
|
#!/bin/sh
|
||
|
exec >&2
|
||
|
[ "${NIXREDO_ROOT-x}" != x ] || { printf "Set NIXREDO_ROOT. Set empty to use global nix store\n"; exit 127; }
|
||
|
|
||
|
f=$(realpath "$1")
|
||
|
drv=$(nix-store --store "$NIXREDO_ROOT" -qd "${f#$NIXREDO_ROOT}/nix/store")
|
||
|
nix-store --store "$NIXREDO_ROOT" -qR "${drv#$NIXREDO_ROOT}"
|