1
0
Fork 0
nixredo/nixredo-deps

9 lines
309 B
Bash

#!/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}"