diff options
| author | Quentin Aristote <quentin@aristote.fr> | 2021-12-11 19:16:08 +0100 |
|---|---|---|
| committer | Quentin Aristote <quentin@aristote.fr> | 2021-12-11 19:16:08 +0100 |
| commit | 44406416d7bc42f011271bff010d8fd7f24aa3ef (patch) | |
| tree | f9d00889e2241b9c80ac33655959ce37317cf677 | |
| parent | 7ed5d61859ffe1a468a38c1b241d37918d411995 (diff) | |
ocaml : add comments in declaration of ocamlInit
| -rw-r--r-- | modules/ocaml.nix | 16 |
1 files changed, 7 insertions, 9 deletions
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 ); |
