You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

8 lines
309 B

#!/bin/sh
PATH="@binPath@:$PATH"
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}"