direnvrc: fix gcroot creation in use-nix

This commit is contained in:
Jörg Thalheim 2020-08-11 07:03:04 +01:00
parent 20e2676b19
commit f8592153f3
No known key found for this signature in database
GPG key ID: 003F2096411B5F92

View file

@ -167,7 +167,7 @@ use_nix() {
# This part is based on https://discourse.nixos.org/t/what-is-the-best-dev-workflow-around-nix-shell/418/4 # This part is based on https://discourse.nixos.org/t/what-is-the-best-dev-workflow-around-nix-shell/418/4
if [[ "${out:-}" != "" ]] && (( update_drv )); then if [[ "${out:-}" != "" ]] && (( update_drv )); then
local drv_link="${direnv_dir}/drv" drv local drv_link="${direnv_dir}/drv" drv
drv=$(nix show-derivation "$1" | grep -E -o -m1 '/nix/store/.*.drv') drv=$(nix show-derivation "$out" | grep -E -o -m1 '/nix/store/.*.drv')
_nix_add_gcroot "$drv" "$drv_link" _nix_add_gcroot "$drv" "$drv_link"
log_status renewed cache and derivation link log_status renewed cache and derivation link
fi fi