Feature. Forester 3.0 › Nix support [00FI]

Forester 3.0 comes with a nix flake for easy integration with nix-based systems. Users of nix can try forester without installing the ocaml toolchain by running nix run sourcehut:~jonsterling/ocaml-forester.

To create a development shell with forester and LaTeX dependencies, create a file named flake.nix with the following content:

{
 inputs = {
   forester = {
     url = "sourcehut:~jonsterling/ocaml-forester";
   };
   flake-utils.url = "github:numtide/flake-utils";
 };
 outputs =
   { self
   , flake-utils
   , nixpkgs
   , forester
   }:
   flake-utils.lib.eachDefaultSystem
     (system:
     let
       pkgs = import nixpkgs { inherit system; };
       legacyPackages = import forester.legacyPackages.${system};
     in
     {
       devShell =
         pkgs.mkShell {
           buildInputs = with pkgs; [
             forester.packages.${system}.default
             texlive.combined.scheme-full
             fswatch
           ];
         };
     });
}

and run nix develop.

The default template now ships with a flake and an envrc. If you created your forest using this template and would like to use direnv, simply copy flake.nix and .envrc to your forest base directory.