From 9b1e10ea2602c76a97ca25c27a0b3842a5bb69de Mon Sep 17 00:00:00 2001 From: Sam Estep Date: Thu, 20 Mar 2025 11:40:57 -0400 Subject: Add Nix flake for direnv (#6635) * Add Nix flake for direnv * Use Sai's suggestion for the `description` * Make `.envrc` optional * Move Nix docs to their own section * Tweak wording * Tweak wording more * Add `nixfmt` --------- Co-authored-by: Sai Praveen Bangaru <31557731+saipraveenb25@users.noreply.github.com> Co-authored-by: Ellie Hermaszewska --- docs/building.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'docs') diff --git a/docs/building.md b/docs/building.md index 504e4e10c..6597c5199 100644 --- a/docs/building.md +++ b/docs/building.md @@ -311,6 +311,20 @@ cmake --preset vs2022 --fresh -A arm64 -DSLANG_GENERATORS_PATH=generators/bin cmake --build --preset release ``` +### Nix + +This repository contains a [Nix](https://nixos.org/) +[flake](https://wiki.nixos.org/wiki/Flakes) (not officially supported or +tested), which provides the necessary prerequisites for local development. Also, +if you use [direnv](https://direnv.net/), you can run the following commands to +have the Nix environment automatically activate when you enter your clone of +this repository: + +```bash +echo 'use flake' >> .envrc +direnv allow +``` + ## Building with an older CMake Because older CMake versions don't support all the features we want to use in -- cgit v1.2.3