use readlink instead of realpath

fixes #54

readpath is not available on macOS.
This commit is contained in:
Jörg Thalheim 2020-12-09 17:33:29 +01:00
parent 9b3e62f10f
commit e5c4a4678a
No known key found for this signature in database
GPG key ID: 003F2096411B5F92

View file

@ -68,7 +68,7 @@ use_flake() {
local tmp_profile="$(direnv_layout_dir)/flake-profile.$$"
[[ -d "$(direnv_layout_dir)" ]] || mkdir -p "$(direnv_layout_dir)"
local tmp_profile_rc=$(nix print-dev-env --profile "$tmp_profile")
drv=$(realpath "$tmp_profile")
drv=$(readlink "$tmp_profile")
echo "$tmp_profile_rc" > "$profile_rc"
rm -f "$tmp_profile" "$tmp_profile"*
_nix_add_gcroot "$drv" "$profile"