mirror of
https://github.com/nix-community/nix-direnv.git
synced 2025-11-08 19:46:11 +01:00
resolve symbolic links to nixpkgs
Fixes version detection if nixpkgs is a symbolic link into the nix store.
This commit is contained in:
parent
5e729f239f
commit
1425ff4592
1 changed files with 1 additions and 1 deletions
2
direnvrc
2
direnvrc
|
|
@ -361,7 +361,7 @@ use_nix() {
|
|||
|
||||
local layout_dir path version
|
||||
layout_dir=$(direnv_layout_dir)
|
||||
if path=$(_nix eval --impure --expr "<nixpkgs>" 2>/dev/null); then
|
||||
if path=$(realpath -e "$(_nix eval --impure --expr "<nixpkgs>" 2>/dev/null)"); then
|
||||
if [[ -f "${path}/.version-suffix" ]]; then
|
||||
version=$(<"${path}/.version-suffix")
|
||||
elif [[ -f "${path}/.git/HEAD" ]]; then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue