Provides a nix shell containing an emacs
overlay and any agda
packages specified in shell nix. It provides the standard-library
and cubical
by default.
Install cachix and then use it download any prebuilt derivations available.
cachix use nix-emacs-agda
to download current builds instead of building them locally.
Nixpkgs
maintains a set of agda
libraries that can be added to a
derivation managed by the nix package manager,
see here
for details.
The file shell.nix
in our repository contains a derivation that will add emacs
, agda
, the agda standard library
,
and cubical agda
to your local nix store and subsequently to a local shell environment by adding these locations to your PATH
.
However, because user configurations for emacs
are mutable,
it will not (easily) manage your (emacs configuration) dot-files,
so we will use the underlying emacs
provided by nixpkgs
but install doom emacs
normally in your local user's environment.
-
Install
doom emacs
(or whichever text editor you prefer) via the method described for your operating system as here(If you are on Windows with NixOS on WSL2 then you are a linux user for the rest of the installation and should do everything in a termial inside NixOS.)
-
Install
Nix
(notNixOS
) using following the guidanceon the official site <https://nixos.org/download.html#nix-install-linux>
. -
In the root directory of this project enter a
nix-shell
:nix-shell
-
Run doom from within the
nix-shell
:doom run
-
doom
should run if configured correctly. Using doom or your favorite editor, edit.doom.d/init.el
and replace;; agda
in the;; lang
section with(agda +local)
to tell doom to use theagda-mode
version specified by the local environment. Once the file is saved, syncdoom
from within thenix-shell
that was loaded above:doom sync
-
You can now load the agda source code in this by starting doom from the nix-shell:
doom run .