Add a shell.nix to modules for easier testing
- Dominant language
- Emacs Lisp
- Stars
- 22.7k
- Forks
- 3.1k
- Avg merge
- 10h 46m
- Merged PRs (30d)
- 4
Description
As Doom continues to grow, so have incoming bug reports for modules I do not use and toolchains I know little about, like `:lang clojure` or `:tools ein`, and so I struggle to support them.
If you know a little nix and use Doom, consider contributing a `shell.nix` file to the module(s) you use the most. Particularly `:lang` modules, so that I can get a test environment up and running to test against.
These shell.nix files should set up a minimum viable environment, installing the language/tools I need to test that module as comprehensively as possible (excluding Emacs and Doom itself). For example, this is what `lang/clojure/test/shell.nix` might look like:
```nix
with import {};
stdenv.mkDerivation rec {
name = "lang-clojure";
buildInputs = [
clojure
joker
leiningen
];
}
```
Understandably, some languages/tools may have more complex needs (such as multiple versions of python, or different environment managers for python, etc). For these, feel free to add arguments to the derivation to be passed via `--argstr`, like I have with Doom's [test/shell.nix](https://github.com/hlissner/doom-emacs/blob/develop/test/shell.nix) (installs Doom + Emacs 26.3) and [test/shell.head.nix](https://github.com/hlissner/doom-emacs/blob/develop/test/shell.head.nix) (installs Doom + Emacs 28+).
If you want to modularize them, place additional nix files in that module's `test/` subdirectory.
Also: I'm still new to the nix language and am open to suggestions!
Contributor guide
Assessment
This issue has not been assessed yet.