diff options
| author | John MacFarlane <jgm@berkeley.edu> | 2023-03-15 09:14:41 -0700 |
|---|---|---|
| committer | John MacFarlane <jgm@berkeley.edu> | 2023-03-15 09:14:41 -0700 |
| commit | 1c70458f3e8559d0f83d1ae56dff951fa0ae0db7 (patch) | |
| tree | 1b7c9730e8a99412333c0b6688b2c06eb0678889 /doc | |
| parent | 1bfab1d11ecf65362c0e8fde98a66c0e6f08f258 (diff) | |
Add some notes on using NiX to develop pandoc.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/nix.md | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/doc/nix.md b/doc/nix.md new file mode 100644 index 000000000..ce25b2f8a --- /dev/null +++ b/doc/nix.md @@ -0,0 +1,26 @@ +--- +title: Using NiX to develop pandoc +author: John MacFarlane +--- + +The source directory contains `shell.nix` and `flake.nix`, +so if you have NiX installed, you can use either `nix shell` +or `nix develop` can be used to obtain a shell with pandoc +dependencies installed. + +To set up `direnv` so that the NiX shell is automatically +activated whenever the directory is entered, add the following +`.envrc` in the pandoc source directory: + +``` +if ! has nix_direnv_version || ! nix_direnv_version 2.2.1; then + source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.2.1/direnvrc" "sha256-zelF0vLbEl5uaqrfIzbgNzJWGmLzCmYAkInj/LNxvKs=" +fi +use flake +``` + +This uses [nix-direnv] for caching. See its web page for +further help. + +[nix-direnv]: https://github.com/nix-community/nix-direnv + |
