FYBNOJLTCRNCVUO65HCB5KI6OVOBU5AWG5RKMENQEFDPWZYKCVIAC
7KPFEFGSLLELQ6YOLPGWOB563IDMTOXWL6I7E7RJFWVXPXAUDXMQC
U6EHWR7YKTWFC3OLM42N22EP6WUNLFJD5O62JSVWWIF4AUY7FNXAC
VGNXPE5DM3XWUVJ44PSQT5OVUZEKRPKTWWPM2FJLRPAR4DTGR2AQC
WNFTZY3MQBNYY2V6XEI2DHZEZGRUMVWK23IN34YW3OISLSJHGFYQC
W2G433QU3JDG72JL6GYR6E5HMAHFP3OF2DLFB3O42245XTE6VGZQC
BH5XPS7CPEH4MNGTZONRZYABNOUUVYNNQ5YRXMBCHXIXTAAPH3RQC
VUARRVTIHYO4S574PJNJYJ4CFNAV2TQZ7S2C5TCRBHSVI255FR7AC
TEQJC3HX2GJBTJWUGW5FXUSPKTPMSHGHFHJI75WMUPZRTGP6GRZQC
VXZ5QMIEF5MRBUALM5HPRLOCJ2CCCS3D4QNOB5T2W56NAOCD5CXAC
VMUKZQZRR5NP7IVLXQ4RYGIHJOXB6MKS4YIIVEFU7S4OEK4QSFVAC
ZV5WPO25EFV4XOPU7YDFKKJW4PMZK4JHMJYHZR54Z2NGV53NQF2QC
local -r storepath="${1}"
echo "Preventing GC for '${storepath}'"
local -r gcroot="${__nix_gcroot_dir}/${__nix_gcroot_prefix}-$(basename "${storepath}")"
rm -f "${gcroot}"
ln -s "${storepath}" "${gcroot}"
if [ "${WRAP_NIX_MAKE_GCROOTS:-0}" = 1 ]; then
local -r storepath="${1}"
echo "Preventing GC for '${storepath}'"
local -r gcroot="${__nix_gcroot_dir}/${__nix_gcroot_prefix}-$(basename "${storepath}")"
rm -f "${gcroot}"
ln -s "${storepath}" "${gcroot}"
fi
local __encountered_dashes=0
while [ $# -gt 0 ]; do
if [ "$1" == "--" ]; then
__encountered_dashes=1
elif [ "${__encountered_dashes}" = 1 ]; then
args+=("$1")
else
nix_args+=("$1")
fi
shift
done
local __encountered_dashes=0
while [ $# -gt 0 ]; do
if [ "$1" == "--" ]; then
__encountered_dashes=1
elif [ "${__encountered_dashes}" = 1 ]; then
args+=("$1")
else
nix_args+=("$1")
fi
shift
done
local storepath
if [ "${action}" = run ]; then
command nix run "${nix_args[@]}" -- "${args[@]}"
for storepath in $(command nix build "${nix_args[@]}" --no-link --print-out-paths); do
__nix_make_gcroot "${storepath}"
done
elif [ "${action}" = build ]; then
command nix build "${nix_args[@]}"
for storepath in $(command nix build "${nix_args[@]}" --no-link --print-out-paths); do
__nix_make_gcroot "${storepath}"
done
elif [ "${action}" = develop ]; then
# shellcheck disable=SC2016
storepath="$(command nix develop "${nix_args[0]}" --command bash -c 'echo ${NIX_GCROOT}' 2>/dev/null)"
local storepath
if [ "${action}" = run ]; then
command nix run "${nix_args[@]}" -- "${args[@]}"
for storepath in $(command nix build "${nix_args[@]}" --no-link --print-out-paths); do
for storepath in $(command nix build "${nix_args[@]}" --no-link --print-out-paths); do
__nix_make_gcroot "${storepath}"
done
elif [ "${action}" = develop ]; then
# shellcheck disable=SC2016
storepath="$(command nix develop "${nix_args[0]}" --command bash -c 'echo ${NIX_GCROOT}' 2>/dev/null)"
__nix_make_gcroot "${storepath}"
command nix develop "${nix_args[@]}"
else
command nix "${action}" "${nix_args[@]}"
h "Maybe there was no output; this means that package was already built and put into the Nix store"
, "Let's build it again so we can see what happens under the hood"
i nix build "${dir}" -L --rebuild