From a56a7b53e49bd55722c80165b9510bbc747efea4 Mon Sep 17 00:00:00 2001 From: Ophir Lojkine Date: Mon, 12 Oct 2026 09:24:58 +0000 Subject: [PATCH] Make Nix optional when using direnv --- .envrc | 4 +++- CONTRIBUTING.md | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.envrc b/.envrc index 3550a30f2..09ae5f36d 100755 --- a/.envrc +++ b/.envrc @@ -1 +1,3 @@ -use flake +if command -v nix >/dev/null 2>&1; then + use flake +fi diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2b91b5105..a706cff1c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -21,7 +21,7 @@ crates include browser assets and do not require Node.js. ### Optional: Nix dev shell -If you have [Nix](https://nixos.org/download/) with flakes enabled, `nix develop` provides the tools above at the versions CI uses. With [direnv](https://direnv.net/), `direnv allow` enters the shell automatically when you enter the directory. +If you have [Nix](https://nixos.org/download/) with flakes enabled, `nix develop` provides the tools above at the versions CI uses. With [direnv](https://direnv.net/), `direnv allow` enters the shell automatically when you enter the directory. When Nix is not installed, direnv leaves your environment unchanged. | Command | What it runs | | --- | --- |