Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Ocaml Environment
with import <nixpkgs> {};
let
ocamlPackages = pkgs.recurseIntoAttrs pkgs.ocamlPackages_latest;
# findlibSiteLib = "${ocamlPackages.findlib}/lib/ocaml/${ocamlVersion}/site-lib";
# ocamlVersion = (builtins.parseDrvName ocamlPackages.ocaml.name).version;
# ocamlInit = pkgs.writeText "ocamlinit" ''
# let () =
# try Topdirs.dir_directory "${findlibSiteLib}"
# with Not_found -> ()
# ;;
# #use "topfind";;
# #thread;;
# #camlp4o;;
# #require "core";;
# #require "core.syntax";;
# '';
in
stdenv.mkDerivation rec {
name = "rwo-shell";
buildInputs = with ocamlPackages; [
ocaml
base
utop
# findlib
];
# shellHook = ''
# alias utop = "utop -init ${ocamlInit}""
# '';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment