From 44406416d7bc42f011271bff010d8fd7f24aa3ef Mon Sep 17 00:00:00 2001 From: Quentin Aristote Date: Sat, 11 Dec 2021 19:16:08 +0100 Subject: ocaml : add comments in declaration of ocamlInit --- modules/ocaml.nix | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'modules') diff --git a/modules/ocaml.nix b/modules/ocaml.nix index 8c42bee..748e2ec 100644 --- a/modules/ocaml.nix +++ b/modules/ocaml.nix @@ -17,23 +17,21 @@ let stdlibDir = "${cfg.ocamlPackages.findlib}/lib/ocaml/${cfg.version}/site-lib"; ocamlInit = pkgs.writeText "ocamlinit" ( - + # load libs (concatStringsSep "\n" (map (dir: '' let () = try Topdirs.dir_directory "${dir}" with Not_found -> ();; - '') ([ stdlibDir ] ++ cfg.toplevel.libDirs))) - - + '' + '') ([ stdlibDir ] ++ cfg.toplevel.libDirs))) + '' #use "topfind";; '' - - + (optionalString cfg.toplevel.list "#list;;") - + # enable threading + (optionalString cfg.toplevel.thread "#thread;;") - + # list packages + + (optionalString cfg.toplevel.list "#list;;") + # require packages + (concatStringsSep "\n" (map (pkg: ''# require "${pkg.pname}";;'') userPackages)) - + # additional init commands + cfg.toplevel.extraInit ); -- cgit v1.2.3