Skip to content

Commit e22633b

Browse files
committed
template: use direnv only
nix-direnv depends on NIX_BUILD_TOP, which is removed from our cleaned environment. Fixes #188
1 parent 6ec7953 commit e22633b

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

template/.envrc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
if ! has nix_direnv_version || ! nix_direnv_version 1.3.0; then
2-
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/1.3.0/direnvrc" "sha256-1VWM1BnI1GvclYBky5f5Y9HqeThmQUwCWQbsFQM1Eu0="
1+
if [[ $(type -t use_flake) != function ]]; then
2+
echo "ERROR: use_flake function missing."
3+
echo "Please update direnv to v2.30.0 or later."
4+
exit 1
35
fi
46

57
use flake

0 commit comments

Comments
 (0)