summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorSam Estep <sam@samestep.com>2025-03-20 11:40:57 -0400
committerGitHub <noreply@github.com>2025-03-20 23:40:57 +0800
commit9b1e10ea2602c76a97ca25c27a0b3842a5bb69de (patch)
treeea86679dca57d7fffe69a10f31ffc77d86f07d69 /docs
parentde6cc94e3b7fa5d1b8eeb53993dbf3ca2cec1cc1 (diff)
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 <ellieh@nvidia.com>
Diffstat (limited to 'docs')
-rw-r--r--docs/building.md14
1 files changed, 14 insertions, 0 deletions
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