mirror of
https://github.com/nix-community/nix-direnv.git
synced 2025-11-08 11:36:11 +01:00
Merge pull request #587 from gravndal/realpath
resolve symbolic links to nixpkgs
This commit is contained in:
commit
c3b16828a9
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