Skip to content

Instantly share code, notes, and snippets.

@jethrokuan
Created December 4, 2018 06:09
Show Gist options
  • Save jethrokuan/a6f2775f09a88e44463e2e00b60ec287 to your computer and use it in GitHub Desktop.
Save jethrokuan/a6f2775f09a88e44463e2e00b60ec287 to your computer and use it in GitHub Desktop.
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