Based on my readings (notably the wiki and this blog post), I have come up with the following default.nix
that I load with nix-shell
:
with import <nixpkgs> {};
let emacs =
emacsWithPackages (p : [ p.tuareg ]);
in
stdenv.mkDerivation rec {
name = "env";
src = ./.;
# Customizable development requirements
buildInputs = [
pkgconfig
ocaml
ocamlPackages.merlin
ocamlPackages.findlib
ocamlPackages.lablgtk
ocamlPackages.camlp5_transitional
ncurses
emacs
];
# Customizable development shell setup
shellHook = ''
export PATH=`pwd`/bin:$PATH
'';
}
But it always prints a warning:
warning: dumping very large path (> 256 MiB); this may run out of memory
and takes quite long to load (about 45 seconds the first time I call nix-shell
after start-up, about 2 seconds on subsequent calls).
What is the meaning of this message? When I look for it on Google, I find a few GitHub issues but not expressed in a way that is easy to understand for the layman.
Can I speed up the load and remove this message? It seems to me that I'm doing something wrong.
Are there general recommendations on writing this kind of development environment that I might not be aware of?