Installation
Jotain uses Nix to build Emacs from source, driven by aJustfile task runner. Development assumes a devenv shell (managed by direnv via .envrc, or entered manually with devenv shell).
Prerequisites
- Nix package manager with
nix-buildavailable - just task runner (provided by the devenv shell)
- devenv (optional but recommended for development)
just recipes assume the devenv shell is active. If you do not use direnv, prefix any command with devenv shell --, e.g. devenv shell -- just check.
Building Emacs
The default build targets the current system and includes every tree-sitter grammar from nixpkgs:nix-build --argstr system <current-system> default.nix, which wraps emacs.nix with emacsPackagesFor ... withPackages to add treesit-grammars.with-all-grammars. For the plain Emacs 30 mainline build (the emacs.nix default), the store path is bit-for-bit identical to pkgs.emacs30 on nixpkgs-unstable, so the public binary cache is hit and nothing recompiles from source.
Build Variants
Everyemacs.nix argument is forwarded through default.nix. The Justfile provides shortcuts for the common flavours:
nix-build directly with any argument the emacs.nix file accepts:
For
git/unstable/igc variants the first build will fail and report the expected hash. Re-run with --argstr hash "sha256-..." (or edit emacs.nix to pin it).Running
Jotain is designed to be launched out of its own checkout via--init-directory, so it never touches ~/.emacs.d.
just run simply invokes emacs --init-directory=<repo>. The devenv shell ships the same Emacs that just build-bare produces, so running inside direnv is usually enough for day-to-day use — no nix-build required.