From 1287f061558a300710dd432b35f2bfc76193eb24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dimitrije=20Radojevi=C4=87?= Date: Thu, 8 Aug 2024 20:38:40 +0100 Subject: [PATCH] ocamlPackages.janestreet: 0.16 -> 0.17 (#329201) --- .../version-management/merge-fmt/default.nix | 3 + .../merge-fmt/merge-fmt.patch | 248 ++ .../ocaml-modules/bistro/default.nix | 12 +- .../bistro/janestreet-0.16.patch | 205 -- .../ocaml-modules/camlimages/camlimages.patch | 103 + .../ocaml-modules/camlimages/default.nix | 5 +- .../ocaml-modules/cfstream/default.nix | 2 +- ...treet-0.16.patch => janestreet-0.17.patch} | 24 +- .../development/ocaml-modules/dbf/default.nix | 6 +- .../ocaml-modules/genspio/default.nix | 3 + .../ocaml-modules/genspio/genspio.patch | 714 ++++++ .../ocaml-modules/janestreet/0.17.nix | 1985 +++++++++++++++++ .../janestreet/janePackage_0_17.nix | 39 + .../janestreet/js_of_ocaml_patches.patch | 24 + .../ocaml-modules/ocamlformat/generic.nix | 13 +- .../ocaml-modules/tdigest/default.nix | 3 + .../ocaml-modules/tdigest/tdigest.patch | 17 + pkgs/tools/misc/flitter/flitter.patch | 35 +- pkgs/top-level/ocaml-packages.nix | 12 +- 19 files changed, 3225 insertions(+), 228 deletions(-) create mode 100644 pkgs/applications/version-management/merge-fmt/merge-fmt.patch delete mode 100644 pkgs/development/ocaml-modules/bistro/janestreet-0.16.patch create mode 100644 pkgs/development/ocaml-modules/camlimages/camlimages.patch rename pkgs/development/ocaml-modules/cfstream/{janestreet-0.16.patch => janestreet-0.17.patch} (59%) create mode 100644 pkgs/development/ocaml-modules/genspio/genspio.patch create mode 100644 pkgs/development/ocaml-modules/janestreet/0.17.nix create mode 100644 pkgs/development/ocaml-modules/janestreet/janePackage_0_17.nix create mode 100644 pkgs/development/ocaml-modules/janestreet/js_of_ocaml_patches.patch create mode 100644 pkgs/development/ocaml-modules/tdigest/tdigest.patch diff --git a/pkgs/applications/version-management/merge-fmt/default.nix b/pkgs/applications/version-management/merge-fmt/default.nix index 6a9a18aa992f..3924650d994d 100644 --- a/pkgs/applications/version-management/merge-fmt/default.nix +++ b/pkgs/applications/version-management/merge-fmt/default.nix @@ -15,6 +15,9 @@ buildDunePackage rec { buildInputs = [ cmdliner base stdio ]; + # core v0.17 compatibility, obtained by `git diff -r 3e37827~2..3e37827` + patches = [ ./merge-fmt.patch ]; + meta = with lib; { description = "Git mergetool leveraging code formatters"; homepage = "https://github.com/hhugo/merge-fmt"; diff --git a/pkgs/applications/version-management/merge-fmt/merge-fmt.patch b/pkgs/applications/version-management/merge-fmt/merge-fmt.patch new file mode 100644 index 000000000000..d2438b3b3bfd --- /dev/null +++ b/pkgs/applications/version-management/merge-fmt/merge-fmt.patch @@ -0,0 +1,248 @@ +diff --git a/.ocamlformat b/.ocamlformat +index fe6ed57..3532006 100644 +--- a/.ocamlformat ++++ b/.ocamlformat +@@ -3,4 +3,4 @@ type-decl=sparse + break-separators=before + if-then-else=keyword-first + dock-collection-brackets=false +-version=0.24.1 +\ No newline at end of file ++version=0.26.1 +\ No newline at end of file +diff --git a/dune b/dune +index 61ec19c..9446de9 100644 +--- a/dune ++++ b/dune +@@ -2,22 +2,34 @@ + (targets merge-fmt-help.txt) + (deps ./src/merge_fmt.exe) + (mode promote) +- (action (with-stdout-to %{targets} (run ./src/merge_fmt.exe --help=plain)))) ++ (action ++ (with-stdout-to ++ %{targets} ++ (run ./src/merge_fmt.exe --help=plain)))) + + (rule + (targets merge-fmt-mergetool-help.txt) + (deps ./src/merge_fmt.exe) + (mode promote) +- (action (with-stdout-to %{targets} (run ./src/merge_fmt.exe mergetool --help=plain)))) ++ (action ++ (with-stdout-to ++ %{targets} ++ (run ./src/merge_fmt.exe mergetool --help=plain)))) + + (rule + (targets merge-fmt-setup-mergetool-help.txt) + (deps ./src/merge_fmt.exe) + (mode promote) +- (action (with-stdout-to %{targets} (run ./src/merge_fmt.exe setup-mergetool --help=plain)))) ++ (action ++ (with-stdout-to ++ %{targets} ++ (run ./src/merge_fmt.exe setup-mergetool --help=plain)))) + + (rule + (targets merge-fmt-setup-merge-help.txt) + (deps ./src/merge_fmt.exe) + (mode promote) +- (action (with-stdout-to %{targets} (run ./src/merge_fmt.exe setup-merge --help=plain)))) ++ (action ++ (with-stdout-to ++ %{targets} ++ (run ./src/merge_fmt.exe setup-merge --help=plain)))) +diff --git a/dune-project b/dune-project +index 4b39e3f..2bc4ec2 100644 +--- a/dune-project ++++ b/dune-project +@@ -1,3 +1,2 @@ +-(lang dune 1.6) +-(using fmt 1.0) ++(lang dune 3.0) + (name merge-fmt) +diff --git a/merge-fmt.opam b/merge-fmt.opam +index 6827173..579f6a1 100644 +--- a/merge-fmt.opam ++++ b/merge-fmt.opam +@@ -11,7 +11,7 @@ build: [["dune" "build" "-p" name "-j" jobs]] + + depends: [ + "ocaml" {>= "4.06.1"} +- "dune" {>= "1.6"} ++ "dune" {>= "3.0"} + "cmdliner" {>= "1.1.0"} + "base" + "stdio" +diff --git a/src/common.ml b/src/common.ml +index 3ca6809..f88bbd9 100644 +--- a/src/common.ml ++++ b/src/common.ml +@@ -18,8 +18,8 @@ let open_process_in_respect_exit ~echo fmt = + let contents = In_channel.input_all ic in + match Unix.close_process_in ic with + | WEXITED 0 -> contents +- | WEXITED n -> Caml.exit n +- | WSIGNALED _ | WSTOPPED _ -> Caml.exit 1) ++ | WEXITED n -> Stdlib.exit n ++ | WSIGNALED _ | WSTOPPED _ -> Stdlib.exit 1) + fmt + + let system ~echo fmt = +@@ -35,8 +35,8 @@ let system_respect_exit ~echo fmt = + if echo then eprintf "+ %s\n%!" s; + match Unix.system s with + | WEXITED 0 -> () +- | WEXITED n -> Caml.exit n +- | WSIGNALED _ | WSTOPPED _ -> Caml.exit 1) ++ | WEXITED n -> Stdlib.exit n ++ | WSIGNALED _ | WSTOPPED _ -> Stdlib.exit 1) + fmt + + module Flags = struct +diff --git a/src/dune b/src/dune +index 1ae55ce..1cfd576 100644 +--- a/src/dune ++++ b/src/dune +@@ -1,5 +1,4 @@ + (executables +- (names merge_fmt) +- (public_names merge-fmt) +- (libraries base stdio unix cmdliner) +-) +\ No newline at end of file ++ (names merge_fmt) ++ (public_names merge-fmt) ++ (libraries base stdio unix cmdliner)) +diff --git a/src/fmters.ml b/src/fmters.ml +index e190f4b..43616ab 100644 +--- a/src/fmters.ml ++++ b/src/fmters.ml +@@ -36,7 +36,7 @@ let dune ~bin = + + let find ~config ~filename ~name = + let filename = Option.value ~default:filename name in +- match (filename, Caml.Filename.extension filename, config) with ++ match (filename, Stdlib.Filename.extension filename, config) with + | _, (".ml" | ".mli"), { ocamlformat_path; _ } -> + Some (ocamlformat ~bin:ocamlformat_path ~name) + | _, (".re" | ".rei"), { refmt_path; _ } -> Some (refmt ~bin:refmt_path) +diff --git a/src/merge_cmd.ml b/src/merge_cmd.ml +index a0fa68f..6cd5377 100644 +--- a/src/merge_cmd.ml ++++ b/src/merge_cmd.ml +@@ -2,7 +2,12 @@ open Base + open Stdio + open Common + +-let debug_oc = lazy (Out_channel.create ~append:true "/tmp/merge-fmt.log") ++let debug_oc = ++ lazy ++ (Out_channel.create ~append:true ++ (Stdlib.Filename.concat ++ (Stdlib.Filename.get_temp_dir_name ()) ++ "merge-fmt.log")) + + let debug fmt = + if true +@@ -12,7 +17,7 @@ let debug fmt = + let merge config echo current base other output name = + match (current, base, other) with + | (None | Some ""), _, _ | _, (None | Some ""), _ | _, _, (None | Some "") -> +- Caml.exit 1 ++ Stdlib.exit 1 + | Some current, Some base, Some other -> ( + match Fmters.find ~config ~filename:current ~name with + | None -> +@@ -30,7 +35,7 @@ let merge config echo current base other output name = + |> Result.map_error ~f:(Fn.const "base") + in + match Result.combine_errors [ x; y; z ] with +- | Error _ -> Caml.exit 1 ++ | Error _ -> Stdlib.exit 1 + | Ok (_ : unit list) -> + debug "process all three revision successfully\n%!"; + debug "running git merge-file\n%!"; +@@ -41,7 +46,7 @@ let merge config echo current base other output name = + (match output with + | None -> Out_channel.output_string stdout result + | Some o -> Out_channel.write_all o ~data:result); +- Caml.exit 0)) ++ Stdlib.exit 0)) + + open Cmdliner + +diff --git a/src/resolve_cmd.ml b/src/resolve_cmd.ml +index bd7f5e3..60a36a4 100644 +--- a/src/resolve_cmd.ml ++++ b/src/resolve_cmd.ml +@@ -67,9 +67,9 @@ let show ~echo version versions = + + let create_tmp ~echo fn version versions = + let content = show ~echo version versions in +- let ext = Caml.Filename.extension fn in ++ let ext = Stdlib.Filename.extension fn in + let base = +- if String.equal ext "" then fn else Caml.Filename.chop_extension fn ++ if String.equal ext "" then fn else Stdlib.Filename.chop_extension fn + in + let fn' = sprintf "%s.%s%s" base (string_of_version version) ext in + let oc = Out_channel.create fn' in +@@ -114,7 +114,7 @@ let resolve config echo () = + if Map.is_empty all + then ( + eprintf "Nothing to resolve\n%!"; +- Caml.exit 1); ++ Stdlib.exit 1); + Map.iteri all ~f:(fun ~key:filename ~data:versions -> + match versions with + | Ok versions -> ( +@@ -131,7 +131,7 @@ let resolve config echo () = + | None -> eprintf "Ignore %s (no formatter register)\n%!" filename) + | Error reason -> eprintf "Ignore %s (%s)\n%!" filename reason); + let all = ls ~echo () in +- if Map.is_empty all then Caml.exit 0 else Caml.exit 1 ++ if Map.is_empty all then Stdlib.exit 0 else Stdlib.exit 1 + + open Cmdliner + +diff --git a/test/dune b/test/dune +index c0e4f3a..2fde0ee 100644 +--- a/test/dune ++++ b/test/dune +@@ -1,17 +1,22 @@ + (library +- (name merge_fmt_test) +- (libraries base stdio unix core_unix core_unix.filename_unix) +- (inline_tests) +- (preprocessor_deps ../src/merge_fmt.exe) +- (preprocess (pps ppx_expect))) +- ++ (name merge_fmt_test) ++ (libraries base stdio unix core_unix core_unix.filename_unix) ++ (inline_tests) ++ (preprocessor_deps ../src/merge_fmt.exe) ++ (preprocess ++ (pps ppx_expect))) + + ;; [rebase_a.ml] and [rebase_b.ml] should be the same expect that + ;; [rebase_b.ml] does rebase in an intermediate revision. ++ + (rule +- (targets rebase.diff.gen) +- (action (with-stdout-to %{targets} (bash "diff %{dep:rebase_a.ml} %{dep:rebase_b.ml} || true")))) ++ (targets rebase.diff.gen) ++ (action ++ (with-stdout-to ++ %{targets} ++ (bash "diff %{dep:rebase_a.ml} %{dep:rebase_b.ml} || true")))) + +-(alias +- (name runtest) +- (action (diff rebase.diff rebase.diff.gen))) +\ No newline at end of file ++(rule ++ (alias runtest) ++ (action ++ (diff rebase.diff rebase.diff.gen))) diff --git a/pkgs/development/ocaml-modules/bistro/default.nix b/pkgs/development/ocaml-modules/bistro/default.nix index bb424a5ce9ae..5444c74cb14b 100644 --- a/pkgs/development/ocaml-modules/bistro/default.nix +++ b/pkgs/development/ocaml-modules/bistro/default.nix @@ -16,19 +16,15 @@ buildDunePackage rec { pname = "bistro"; - version = "unstable-2022-05-07"; - - duneVersion = "3"; + version = "unstable-2024-05-17"; src = fetchFromGitHub { owner = "pveber"; repo = pname; - rev = "d363bd2d8257babbcb6db15bd83fd6465df7c268"; - sha256 = "0g11324j1s2631zzf7zxc8s0nqd4fwvcni0kbvfpfxg96gy2wwfm"; + rev = "d44c44b52148e58ca3842c3efedf3115e376d800"; + sha256 = "sha256-naoCEVBfydqSeGGbXYBXfg0PP+Fzk05jFoul7XAz/tM="; }; - patches = [ ./janestreet-0.16.patch ]; - propagatedBuildInputs = [ base64 bos @@ -43,7 +39,7 @@ buildDunePackage rec { tyxml ]; - minimalOCamlVersion = "4.12"; + minimalOCamlVersion = "4.14"; meta = { inherit (src.meta) homepage; diff --git a/pkgs/development/ocaml-modules/bistro/janestreet-0.16.patch b/pkgs/development/ocaml-modules/bistro/janestreet-0.16.patch deleted file mode 100644 index bf3b41eb4ac8..000000000000 --- a/pkgs/development/ocaml-modules/bistro/janestreet-0.16.patch +++ /dev/null @@ -1,205 +0,0 @@ -diff --git a/lib/engine/scheduler.ml b/lib/engine/scheduler.ml -index e32bd0f..93b566b 100644 ---- a/lib/engine/scheduler.ml -+++ b/lib/engine/scheduler.ml -@@ -601,7 +601,7 @@ module Make(Backend : Backend) = struct - ) - ) - | Trywith tw -> ( -- match Table.find sched.traces (Workflow.id tw.w) with -+ match Hashtbl.find sched.traces (Workflow.id tw.w) with - | Some eventual_trace -> ( - eventual_trace >>= function - | Ok (Run r) -> -@@ -667,10 +667,10 @@ module Make(Backend : Backend) = struct - let register_build sched ~id ~build_trace = - let open Eval_thread.Infix in - ( -- match Table.find sched.traces id with -+ match Hashtbl.find sched.traces id with - | None -> - let trace = build_trace () in -- Table.set sched.traces ~key:id ~data:trace ; -+ Hashtbl.set sched.traces ~key:id ~data:trace ; - trace - | Some trace -> trace - ) >>= fun trace -> -@@ -854,7 +854,7 @@ module Make(Backend : Backend) = struct - Eval_thread.join l.elts ~f:(build ?target sched) - | Trywith tw -> ( - build sched ?target tw.w >> fun w_result -> -- match Table.find sched.traces (Workflow.id tw.w) with -+ match Hashtbl.find sched.traces (Workflow.id tw.w) with - | Some eventual_trace -> ( - eventual_trace >> function - | Ok (Run r) when run_trywith_recovery r.details -> -diff --git a/lib/multinode/bistro_multinode.ml b/lib/multinode/bistro_multinode.ml -index 01dc5ac..3fc6b0e 100644 ---- a/lib/multinode/bistro_multinode.ml -+++ b/lib/multinode/bistro_multinode.ml -@@ -130,7 +130,7 @@ module Server = struct - let search (type s) (table : s String.Table.t) ~f = - let module M = struct exception Found of string * s end in - try -- String.Table.fold table ~init:() ~f:(fun ~key ~data () -> if f ~key ~data then raise (M.Found (key, data))) ; -+ Hashtbl.fold table ~init:() ~f:(fun ~key ~data () -> if f ~key ~data then raise (M.Found (key, data))) ; - None - with M.Found (k, v) -> Some (k, v) - -@@ -145,7 +145,7 @@ module Server = struct - match allocation_attempt with - | None -> Some elt - | Some (worker_id, (Resource curr)) -> -- String.Table.set pool.available ~key:worker_id ~data:(Resource { np = curr.np - np ; mem = curr.mem - mem }) ; -+ Hashtbl.set pool.available ~key:worker_id ~data:(Resource { np = curr.np - np ; mem = curr.mem - mem }) ; - Lwt.wakeup u (worker_id, Resource { np ; mem }) ; - None - ) -@@ -163,12 +163,12 @@ module Server = struct - t - - let add_worker pool (Worker { id ; np ; mem ; _ }) = -- match String.Table.add pool.available ~key:id ~data:(Allocator.Resource { np ; mem }) with -+ match Hashtbl.add pool.available ~key:id ~data:(Allocator.Resource { np ; mem }) with - | `Ok -> allocation_pass pool - | `Duplicate -> failwith "A worker has been added twice" - - let release pool worker_id (Allocator.Resource { np ; mem }) = -- String.Table.update pool.available worker_id ~f:(function -+ Hashtbl.update pool.available worker_id ~f:(function - | None -> failwith "Tried to release resources of inexistent worker" - | Some (Resource r) -> Resource { np = r.np + np ; mem = r.mem + mem } - ) -@@ -235,13 +235,13 @@ module Server = struct - | Subscript { np ; mem } -> - let id = new_id () in - let w = create_worker ~np ~mem id in -- String.Table.set state.workers ~key:id ~data:w ; -+ Hashtbl.set state.workers ~key:id ~data:w ; - Worker_allocator.add_worker state.alloc w ; - log (Logger.Debug (sprintf "new worker %s" id)) ; - Lwt.return (Client_id id) - - | Get_job { client_id } -> ( -- match String.Table.find state.workers client_id with -+ match Hashtbl.find state.workers client_id with - | None -> Lwt.return None - | Some (Worker worker) -> - Lwt.choose [ -@@ -250,22 +250,22 @@ module Server = struct - ] >>= function - | `Job wp -> - let workflow_id = workflow_id_of_job_waiter wp in -- String.Table.set worker.running_jobs ~key:workflow_id ~data:wp ; -+ Hashtbl.set worker.running_jobs ~key:workflow_id ~data:wp ; - Lwt.return (Some (job_of_job_waiter wp)) - | `Stop -> Lwt.return None - ) - - | Plugin_result r -> -- let Worker worker = String.Table.find_exn state.workers r.client_id in -+ let Worker worker = Hashtbl.find_exn state.workers r.client_id in - Lwt.return ( -- match String.Table.find_exn worker.running_jobs r.workflow_id with -+ match Hashtbl.find_exn worker.running_jobs r.workflow_id with - | Waiting_plugin wp -> Lwt.wakeup wp.waiter r.result - | Waiting_shell_command _ -> assert false (* should never happen *) - ) - | Shell_command_result r -> -- let Worker worker = String.Table.find_exn state.workers r.client_id in -+ let Worker worker = Hashtbl.find_exn state.workers r.client_id in - Lwt.return ( -- match String.Table.find_exn worker.running_jobs r.workflow_id with -+ match Hashtbl.find_exn worker.running_jobs r.workflow_id with - | Waiting_plugin _ -> assert false (* should never happen *) - | Waiting_shell_command wp -> Lwt.wakeup wp.waiter r.result - ) -@@ -307,7 +307,7 @@ module Server = struct - - let request_resource backend req = - Worker_allocator.request backend.state.alloc req >|= fun (worker_id, resource) -> -- String.Table.find_exn backend.state.workers worker_id, resource -+ Hashtbl.find_exn backend.state.workers worker_id, resource - - let release_resource backend worker_id res = - Worker_allocator.release backend.state.alloc worker_id res -@@ -334,7 +334,7 @@ module Server = struct - * loop () *) - - let eval backend { worker_id ; workflow_id } f x = -- let Worker worker = String.Table.find_exn backend.state.workers worker_id in -+ let Worker worker = Hashtbl.find_exn backend.state.workers worker_id in - let f () = f x in - let t, u = Lwt.wait () in - let job_waiter = Waiting_plugin { waiter = u ; f ; workflow_id } in -@@ -342,7 +342,7 @@ module Server = struct - t - - let run_shell_command backend { worker_id ; workflow_id } cmd = -- let Worker worker = String.Table.find_exn backend.state.workers worker_id in -+ let Worker worker = Hashtbl.find_exn backend.state.workers worker_id in - let t, u = Lwt.wait () in - let job = Waiting_shell_command { waiter = u ; cmd ; workflow_id } in - Lwt_queue.push worker.pending_jobs job ; -diff --git a/lib/utils/dot_output.ml b/lib/utils/dot_output.ml -index 90c299f..d13fceb 100644 ---- a/lib/utils/dot_output.ml -+++ b/lib/utils/dot_output.ml -@@ -24,7 +24,7 @@ module G = struct - (* let successors g u = fold_succ (fun h t -> h :: t) g u [] *) - - let rec of_workflow_aux seen acc u = -- if S.mem seen u then (seen, acc) -+ if Set.mem seen u then (seen, acc) - else ( - let deps = W.Any.deps u in - let seen, acc = -@@ -34,7 +34,7 @@ module G = struct - in - let acc = add_vertex acc u in - let acc = List.fold deps ~init:acc ~f:(fun acc v -> add_edge acc u v) in -- let seen = S.add seen u in -+ let seen = Set.add seen u in - seen, acc - ) - -@@ -109,7 +109,7 @@ let dot_output ?db oc g ~needed = - ] - in - let vertex_attributes u = -- let needed = (match db with None -> true | Some _ -> false) || S.mem needed u in -+ let needed = (match db with None -> true | Some _ -> false) || Set.mem needed u in - let color = if needed then black else light_gray in - let shape = `Shape (shape u) in - let W.Any w = u in -@@ -141,7 +141,7 @@ let dot_output ?db oc g ~needed = - | _ -> [] - in - let color = -- if (match db with None -> true | Some _ -> false) || (S.mem needed u && not (already_done u)) -+ if (match db with None -> true | Some _ -> false) || (Set.mem needed u && not (already_done u)) - then black else light_gray in - style @ [ `Color color ] - in -diff --git a/lib/utils/repo.ml b/lib/utils/repo.ml -index 06abcd5..206a99e 100644 ---- a/lib/utils/repo.ml -+++ b/lib/utils/repo.ml -@@ -160,7 +160,7 @@ let protected_set repo = - | Select s -> fold_path_workflow acc (W.Any s.dir) - | Input _ -> acc - | Shell _ -- | Plugin _ -> String.Set.add acc (W.id w) -+ | Plugin _ -> Set.add acc (W.id w) - | Trywith tw -> - fold_path_workflow (fold_path_workflow acc (W.Any tw.w)) (W.Any tw.failsafe) - | Ifelse ie -> -@@ -187,7 +187,7 @@ let cache_clip_fold ~bistro_dir repo ~f ~init = - let protected = protected_set repo in - let db = Db.init_exn bistro_dir in - Db.fold_cache db ~init ~f:(fun acc id -> -- f db acc (if String.Set.mem protected id then `Protected id else `Unprotected id) -+ f db acc (if Set.mem protected id then `Protected id else `Unprotected id) - ) - - let cache_clip_dry_run ~bistro_dir repo = diff --git a/pkgs/development/ocaml-modules/camlimages/camlimages.patch b/pkgs/development/ocaml-modules/camlimages/camlimages.patch new file mode 100644 index 000000000000..eeeaa723c206 --- /dev/null +++ b/pkgs/development/ocaml-modules/camlimages/camlimages.patch @@ -0,0 +1,103 @@ +diff --git a/config/xConfigurator.ml b/config/xConfigurator.ml +index 268df4a..73e1850 100644 +--- a/config/xConfigurator.ml ++++ b/config/xConfigurator.ml +@@ -8,7 +8,7 @@ let (!%) fmt = Printf.sprintf fmt + module Configurator = struct + include Configurator.V1 + +- let ( ^/ ) = Caml.Filename.concat ++ let ( ^/ ) = Stdlib.Filename.concat + + let path_sep = + if Sys.win32 then +@@ -19,7 +19,7 @@ module Configurator = struct + let exe = if Sys.win32 then ".exe" else "" + + let get_path () = +- match Caml.Sys.getenv "PATH" with ++ match Stdlib.Sys.getenv "PATH" with + | exception Not_found -> [] + | s -> String.split ~on:path_sep s + +@@ -27,7 +27,7 @@ module Configurator = struct + List.find_map dirs ~f:(fun dir -> + List.find_map bases ~f:(fun base -> + let path = dir ^/ base in +- if Caml.Sys.file_exists path then Some path else None)) ++ if Stdlib.Sys.file_exists path then Some path else None)) + + let find_program prog = + let prog = prog ^ exe in +@@ -45,13 +45,13 @@ module Configurator = struct + | s -> + (* findlib 1.7.3 installs META file for graphics + even when there is no graphics library installed. *) +- let dest = Caml.Filename.temp_file "test" ".cma" in +- let res = match Caml.Sys.command & !% "ocamlfind ocamlc -package %s -o %s -linkpkg" n dest with ++ let dest = Stdlib.Filename.temp_file "test" ".cma" in ++ let res = match Stdlib.Sys.command & !% "ocamlfind ocamlc -package %s -o %s -linkpkg" n dest with + | 0 -> Some s + | _ -> None + | exception _ -> None + in +- (try Caml.Sys.remove dest with _ -> ()); ++ (try Stdlib.Sys.remove dest with _ -> ()); + res + | exception Findlib.No_such_package _ -> None + +@@ -83,14 +83,14 @@ type item = + module Make(A : sig val name : string end) = struct + let t = create A.name + +- let log fmt = Caml.Format.eprintf fmt ++ let log fmt = Stdlib.Format.eprintf fmt + + module Package_conf = Package_conf + open Package_conf + + let extract_package_conf xs = +- Caml.List.fold_left merge empty +- (Caml.List.map (fun item -> match item with ++ Stdlib.List.fold_left merge empty ++ (Stdlib.List.map (fun item -> match item with + | Library (Some pkc) -> pkc + | _ -> empty) xs) + +@@ -167,8 +167,8 @@ module Make(A : sig val name : string end) = struct + let by_cc ~c_flags ~link_flags ~headers ~functions:fnames () = + log "Checking library %s by using C compiler... " (String.concat ~sep:" " link_flags); + let headers = "stdio.h" :: headers in +- let includes = Caml.List.map (!% "#include <%s>") headers in +- let fcalls = Caml.List.map (!% " ( (void(*)()) (%s) )();") fnames in ++ let includes = Stdlib.List.map (!% "#include <%s>") headers in ++ let fcalls = Stdlib.List.map (!% " ( (void(*)()) (%s) )();") fnames in + let code = + String.concat ~sep:"\n" + & includes +diff --git a/core/images.ml b/core/images.ml +index 563ab7e..a53a6a4 100644 +--- a/core/images.ml ++++ b/core/images.ml +@@ -102,7 +102,7 @@ let get_extension s = + | _ -> s, "" + + let guess_extension s = +- let s = String.lowercase s in ++ let s = String.lowercase_ascii s in + match s with + | "gif" -> Gif + | "bmp" -> Bmp +diff --git a/core/units.ml b/core/units.ml +index 634bc9c..ddd6eae 100644 +--- a/core/units.ml ++++ b/core/units.ml +@@ -30,7 +30,7 @@ let parse_length s = (* return in pt *) + let digit,unit = + if l > 2 then String.sub s 0 2, String.sub s (l-2) 2 else "", "" in + try +- (List.assoc (String.lowercase unit) units) *. float_of_string digit ++ (List.assoc (String.lowercase_ascii unit) units) *. float_of_string digit + with + | Not_found -> (* think it is in "pt" *) + float_of_string s in diff --git a/pkgs/development/ocaml-modules/camlimages/default.nix b/pkgs/development/ocaml-modules/camlimages/default.nix index b1d3d51c8666..c9f523d098d7 100644 --- a/pkgs/development/ocaml-modules/camlimages/default.nix +++ b/pkgs/development/ocaml-modules/camlimages/default.nix @@ -15,9 +15,8 @@ buildDunePackage rec { sha256 = "1m2c76ghisg73dikz2ifdkrbkgiwa0hcmp21f2fm2rkbf02rq3f4"; }; - postPatch = '' - substituteInPlace core/{images,units}.ml --replace String.lowercase String.lowercase_ascii - ''; + # stdio v0.17 compatibility; also replaces `String.lowercase` with `String.lowercase_ascii` + patches = [ ./camlimages.patch ]; nativeBuildInputs = [ cppo ]; buildInputs = [ dune-configurator findlib graphics lablgtk stdio ]; diff --git a/pkgs/development/ocaml-modules/cfstream/default.nix b/pkgs/development/ocaml-modules/cfstream/default.nix index ba69c40de016..204128adec22 100644 --- a/pkgs/development/ocaml-modules/cfstream/default.nix +++ b/pkgs/development/ocaml-modules/cfstream/default.nix @@ -13,7 +13,7 @@ buildDunePackage rec { hash = "sha256-iSg0QsTcU0MT/Cletl+hW6bKyH0jkp7Jixqu8H59UmQ="; }; - patches = [ ./git_commit.patch ./janestreet-0.16.patch ]; + patches = [ ./git_commit.patch ./janestreet-0.17.patch ]; strictDeps = true; diff --git a/pkgs/development/ocaml-modules/cfstream/janestreet-0.16.patch b/pkgs/development/ocaml-modules/cfstream/janestreet-0.17.patch similarity index 59% rename from pkgs/development/ocaml-modules/cfstream/janestreet-0.16.patch rename to pkgs/development/ocaml-modules/cfstream/janestreet-0.17.patch index afc665f30426..55d0349557bc 100644 --- a/pkgs/development/ocaml-modules/cfstream/janestreet-0.16.patch +++ b/pkgs/development/ocaml-modules/cfstream/janestreet-0.17.patch @@ -1,7 +1,29 @@ +diff --git a/app/cfstream_test.ml b/app/cfstream_test.ml +index 457c5e5..c6a01a5 100644 +--- a/app/cfstream_test.ml ++++ b/app/cfstream_test.ml +@@ -73,7 +73,7 @@ let test_uncombine () = + let test_partition () = + let f x = x mod 2 = 0 in + let l = List.init 100 ~f:(fun _ -> Random.int 10) in +- let r1 = Caml.List.partition f l in ++ let r1 = Stdlib.List.partition f l in + let r2 = of_list l |> partition ~f |> fun (a, b) -> to_list a, to_list b in + assert_equal + ~printer:int_list_tuple_printer diff --git a/lib/CFStream_stream.ml b/lib/CFStream_stream.ml -index 25c0e5a..94da2e3 100644 +index 25c0e5a..835791c 100644 --- a/lib/CFStream_stream.ml +++ b/lib/CFStream_stream.ml +@@ -83,7 +83,7 @@ let find xs ~f = find_map xs ~f:(fun x -> if f x then Some x else None) + let find_exn xs ~f = + match find xs ~f with + | Some x -> x +- | None -> raise Caml.Not_found ++ | None -> raise Stdlib.Not_found + ;; + + let exists xs ~f = @@ -287,7 +287,7 @@ let group_aux xs map eq = ;; diff --git a/pkgs/development/ocaml-modules/dbf/default.nix b/pkgs/development/ocaml-modules/dbf/default.nix index 664cb5dead17..91981fd735cb 100644 --- a/pkgs/development/ocaml-modules/dbf/default.nix +++ b/pkgs/development/ocaml-modules/dbf/default.nix @@ -3,7 +3,7 @@ buildDunePackage rec { pname = "dbf"; - version = "0.1.1"; + version = "0.2.0"; minimalOCamlVersion = "4.08"; @@ -12,8 +12,8 @@ buildDunePackage rec { src = fetchFromGitHub { owner = "pveber"; repo = "dbf"; - rev = version; - hash = "sha256-h1K5YDLbXGEJi/quKXvSR0gZ+WkBzut7AsVFv+Bm8/g="; + rev = "v${version}"; + hash = "sha256-096GodM3J/4dsVdylG+6xz/p6ogUkhDGdFjiPwl/jLQ="; }; buildInputs = [ ppx_cstruct ]; diff --git a/pkgs/development/ocaml-modules/genspio/default.nix b/pkgs/development/ocaml-modules/genspio/default.nix index 14537c24c8bb..338e1dd770c4 100644 --- a/pkgs/development/ocaml-modules/genspio/default.nix +++ b/pkgs/development/ocaml-modules/genspio/default.nix @@ -17,6 +17,9 @@ buildDunePackage rec { propagatedBuildInputs = [ base fmt ]; + # base v0.17 compatibility + patches = [ ./genspio.patch ]; + doCheck = true; meta = with lib; { diff --git a/pkgs/development/ocaml-modules/genspio/genspio.patch b/pkgs/development/ocaml-modules/genspio/genspio.patch new file mode 100644 index 000000000000..8aa912c8aef0 --- /dev/null +++ b/pkgs/development/ocaml-modules/genspio/genspio.patch @@ -0,0 +1,714 @@ +diff --git a/src/examples/downloader.ml b/src/examples/downloader.ml +index 93638e5..a785549 100644 +--- a/src/examples/downloader.ml ++++ b/src/examples/downloader.ml +@@ -1,5 +1,5 @@ + open! Base +-module Filename = Caml.Filename ++module Filename = Stdlib.Filename + + let downloader () = + let open Genspio.EDSL in +@@ -154,7 +154,7 @@ let downloader () = + ; string " -> not HTTP(s) or FTP: NOT IMPLEMENTED" ] ] ) ] ) + + let () = +- match Caml.Sys.argv |> Array.to_list |> List.tl_exn with ++ match Stdlib.Sys.argv |> Array.to_list |> List.tl_exn with + | ["make"; path] -> ( + let script = Genspio.Compile.to_many_lines (downloader ()) in + let content = +@@ -163,12 +163,12 @@ let () = + match path with + | "-" -> Fmt.pr "\n`````\n%s`````\n%!" content + | other -> +- let o = Caml.open_out other in +- Caml.Printf.fprintf o "%s%!" content ; +- Caml.close_out o ) ++ let o = Stdlib.open_out other in ++ Stdlib.Printf.fprintf o "%s%!" content ; ++ Stdlib.close_out o ) + | other -> + Fmt.epr "Wrong command line: [%s]\n" + (List.map ~f:(Fmt.str "%S") other |> String.concat ~sep:"; ") ; + Fmt.epr "Usage:\n%s make \n Create the downloader script.\n%!" +- Caml.Sys.argv.(0) ; +- Caml.exit 1 ++ Stdlib.Sys.argv.(0) ; ++ Stdlib.exit 1 +diff --git a/src/examples/multigit.ml b/src/examples/multigit.ml +index e05885c..b0e5fd2 100644 +--- a/src/examples/multigit.ml ++++ b/src/examples/multigit.ml +@@ -7,7 +7,7 @@ + $genspio_multigit $BINNPATH + *) + open! Base +-module Filename = Caml.Filename ++module Filename = Stdlib.Filename + + let ( // ) = Filename.concat + let msg fmt = Fmt.kstr (Fmt.epr "%s\n%!") fmt +@@ -62,7 +62,7 @@ end + + let version_string = + Fmt.str "%s (Genspio: %s)" +- (try Caml.Sys.getenv "multigit_version" with _ -> "0") ++ (try Stdlib.Sys.getenv "multigit_version" with _ -> "0") + Genspio.Meta.version + + module Multi_status = struct +@@ -504,7 +504,7 @@ end + let cmdf fmt = + Fmt.kstr + (fun s -> +- match Caml.Sys.command s with ++ match Stdlib.Sys.command s with + | 0 -> () + | other -> Fmt.kstr failwith "CMD: %S failed with %d" s other ) + fmt +@@ -531,13 +531,13 @@ module Meta_repository = struct + let cmd_to_string_list cmd = + let i = Unix.open_process_in cmd in + let rec loop acc = +- try loop (Caml.input_line i :: acc) +- with _ -> Caml.close_in i ; List.rev acc in ++ try loop (Stdlib.input_line i :: acc) ++ with _ -> Stdlib.close_in i ; List.rev acc in + loop [] + + let readme_md ~path:_ ~output = +- let o = Caml.open_out output in +- let open Caml.Format in ++ let o = Stdlib.open_out output in ++ let open Stdlib.Format in + let fmt = formatter_of_out_channel o in + let out f = fprintf fmt f in + let sec c s = out "%s\n%s\n\n" s (String.make (String.length s) c) in +@@ -591,7 +591,7 @@ module Meta_repository = struct + par "" ; + section "Authors / Making-of" ; + par +- "This repository is generated by an OCaml program which itself was \ ++ "This repository is generated by an OStdlib.program which itself was \ + written by [Seb Mondet](https://seb.mondet.org), it uses the \ + [Genspio](https://smondet.gitlab.io/genspio-doc/) EDSL library, and \ + serves as one of its examples of usage, see also its \ +@@ -599,7 +599,7 @@ module Meta_repository = struct + par + "Similarly, you may check out the \ + repository, which is also a bunch of shell scripts maintained by an \ +- OCaml program." ; ++ OStdlib.program." ; + section "Example Session / Demo" ; + let git_repos_top = "/tmp/git-repos-example" in + let git_repos_hammerlab = git_repos_top // "hammerlab" in +@@ -724,21 +724,21 @@ end + *) + + let () = +- let path = Caml.Sys.argv.(1) in ++ let path = Stdlib.Sys.argv.(1) in + cmdf "mkdir -p %s" (Filename.quote path) ; + let repomode = +- try String.(Caml.Sys.getenv "repomode" = "true") with _ -> false in ++ try String.(Stdlib.Sys.getenv "repomode" = "true") with _ -> false in + let output filename script long_description = + let gms = if repomode then path // "bin" // filename else path // filename in + msg "Outputting %S" gms ; + cmdf "mkdir -p %s" Filename.(quote (dirname gms)) ; +- let o = Caml.open_out gms in +- Caml.Format.( ++ let o = Stdlib.open_out gms in ++ Stdlib.Format.( + fprintf + (formatter_of_out_channel o) + "#!/bin/sh\n\n%s\n\n%a\n" + ( long_description () +- @ [ "The following is generated by an OCaml program using the \ ++ @ [ "The following is generated by an OStdlib.program using the \ + Genspio EDSL."; "See ." + ] + |> List.map ~f:(Fmt.str "# %s") +@@ -746,7 +746,7 @@ let () = + Genspio.Compile.To_slow_flow.Script.pp_posix + (Genspio.Compile.To_slow_flow.compile + (script () |> Genspio.Transform.Constant_propagation.process) )) ; +- Caml.close_out o ; ++ Stdlib.close_out o ; + cmdf "chmod +x %s" (Filename.quote gms) in + Multi_status.(output name script long_description) ; + Activity_report.(output name script long_description) ; +diff --git a/src/examples/service_composer.ml b/src/examples/service_composer.ml +index ef3c69b..b52969f 100644 +--- a/src/examples/service_composer.ml ++++ b/src/examples/service_composer.ml +@@ -36,7 +36,7 @@ + `cosc config show` is actually able to call `cosc-configuration-display`. + *) + open! Base +-module Filename = Caml.Filename ++module Filename = Stdlib.Filename + + let ( // ) = Filename.concat + let msg fmt = Fmt.kstr (Fmt.epr "%s\n%!") fmt +@@ -46,7 +46,7 @@ module Gedsl = Genspio.EDSL + let cmdf fmt = + Fmt.kstr + (fun s -> +- match Caml.Sys.command s with ++ match Stdlib.Sys.command s with + | 0 -> () + | other -> Fmt.kstr failwith "CMD: %S failed with %d" s other ) + fmt +@@ -87,24 +87,24 @@ module Script = struct + output_path // String.concat ~sep:"-" (root :: t.relative_path) + ``` + +- The function `write` is the only real I/O of this whole OCaml program. ++ The function `write` is the only real I/O of this whole OStdlib.program. + *) + let write ?(compiler = `Slow_flow) t ~output_path ~root = + let path = output_path // String.concat ~sep:"-" (root :: t.relative_path) in +- let o = Caml.open_out path in ++ let o = Stdlib.open_out path in + msg "Outputting “%s” to %s\n%!" t.description path ; + ( match compiler with + | `Slow_flow -> + Fmt.( + pf +- (Caml.Format.formatter_of_out_channel o) ++ (Stdlib.Format.formatter_of_out_channel o) + "#!/bin/sh\n\n%a\n" Genspio.Compile.To_slow_flow.Script.pp_posix + (Genspio.Compile.To_slow_flow.compile + (t.make ~root |> Genspio.Transform.Constant_propagation.process) )) + | `Standard -> +- Caml.Printf.fprintf o "#!/bin/sh\n\n%s\n" ++ Stdlib.Printf.fprintf o "#!/bin/sh\n\n%s\n" + (Genspio.Compile.to_many_lines (t.make ~root)) ) ; +- Caml.close_out o ; cmdf "chmod +x %s" path ++ Stdlib.close_out o ; cmdf "chmod +x %s" path + end + + (*md Configuration of the scripts is bootstrapped with an environment +@@ -275,7 +275,7 @@ module Manual = struct + (Environment.var_configuration_path env) + env.Environment.default_configuration_path root root + @ par +- "The scripts are generated by an OCaml program which uses the \ ++ "The scripts are generated by an OStdlib.program which uses the \ + [Genspio](https://smondet.gitlab.io/genspio-doc) EDSL/library. \ + The code generator serves as one of the usage examples of the \ + library, see its \ +@@ -341,7 +341,7 @@ module Manual = struct + let image = "smondet/genspio-doc-dockerfiles:apps406" in + Fmt.kstr par + "If you have [`opam`](https://opam.ocaml.org), setting up the \ +- genspio repository is easy (only simple, pure OCaml \ ++ genspio repository is easy (only simple, pure OStdlib.\ + dependencies), if not, or if you just like Docker™, the \ + generator is available in the `%s` image, see:" + image +@@ -912,7 +912,7 @@ module Example_script = struct + let basic env root = + let call s = Fmt.str "%s %s" root s in + let conf = "/tmp/example-basic.d" in +- let cmt fmt = Fmt.str Caml.("# " ^^ fmt) in ++ let cmt fmt = Fmt.str Stdlib.("# " ^^ fmt) in + ( "basic" + , [ cmt "We setup the configuration root path:" + ; Fmt.str "export %s=%s" (Environment.var_configuration_path env) conf +@@ -1051,13 +1051,13 @@ let make ?default_configuration_path ?default_screen_name ~name ~output_path () + let () = + let anon = ref [] in + let anon_fun p = anon := p :: !anon in +- let usage = Fmt.str "%s [-help] " Caml.Sys.argv.(0) in ++ let usage = Fmt.str "%s [-help] " Stdlib.Sys.argv.(0) in + let name = ref None in + let output_path = ref None in + let config_path = ref None in + let screen_name = ref None in + let output_readme = ref false in +- let module Arg = Caml.Arg in ++ let module Arg = Stdlib.Arg in + let args = + Arg.align + [ ( "--name" +@@ -1077,7 +1077,7 @@ let () = + , Fmt.str " Where to write the scripts." ) ] in + Arg.parse args anon_fun usage ; + List.iter !anon ~f:(msg "Ignoring %s") ; +- let die () = Caml.exit 2 in ++ let die () = Stdlib.exit 2 in + let need opt = function + | Some o -> o + | None -> +diff --git a/src/examples/small.ml b/src/examples/small.ml +index f6e4504..8c776a6 100644 +--- a/src/examples/small.ml ++++ b/src/examples/small.ml +@@ -1,10 +1,10 @@ + open! Base + +-let examples = ref ([] : (Caml.out_channel -> unit) list) ++let examples = ref ([] : (Stdlib.out_channel -> unit) list) + + let example ?show name description code = + let f o = +- Caml.Printf.fprintf o ++ Stdlib.Printf.fprintf o + "let () = examples := Example.make ~ocaml:%S %s %S %S %s :: !examples\n" + code + (match show with None -> "" | Some s -> Fmt.str "~show:%s" s) +@@ -303,7 +303,7 @@ Genspio.EDSL.( + (******************************************************************************) + + let () = +- let open Caml in ++ let open Stdlib.in + let open Printf in + let o = open_out Sys.argv.(1) in + fprintf o "%s" +@@ -318,7 +318,7 @@ let examples = ref [] + fprintf o "%s" + {ocaml| + let () = +- List.iter (List.rev !examples) ~f:(Example.run Caml.Format.std_formatter) ++ List.iter (List.rev !examples) ~f:(Example.run Stdlib.Format.std_formatter) + |ocaml} ; + close_out o ; + printf "%s: Done.\n%!" Sys.argv.(0) +diff --git a/src/examples/vm_tester.ml b/src/examples/vm_tester.ml +index f8272b9..59c81e0 100644 +--- a/src/examples/vm_tester.ml ++++ b/src/examples/vm_tester.ml +@@ -1,5 +1,5 @@ + open! Base +-module Filename = Caml.Filename ++module Filename = Stdlib.Filename + + let ( // ) = Filename.concat + +@@ -18,7 +18,7 @@ module Shell_script = struct + try String.sub ~pos:0 ~len:40 m with _ -> m + + let path {name; content; _} = +- let open Caml in ++ let open Stdlib.in + let hash = Marshal.to_string content [] |> Digest.string |> Digest.to_hex in + let tag = String.sub hash 0 8 in + "_scripts" // Fmt.str "%s_%s.sh" (sanitize_name name) tag +@@ -54,7 +54,7 @@ module Run_environment = struct + + let tmp_name_of_url = function + | Http (url, ext) -> +- ("_cache" // Caml.Digest.(string url |> to_hex)) ++ ("_cache" // Stdlib.Digest.(string url |> to_hex)) + ^ Option.value_map ~default:"" ext ~f:(fun `Xz -> ".xz") + + let make_files files = +@@ -410,14 +410,14 @@ end + let cmdf fmt = + Fmt.kstr + (fun cmd -> +- match Caml.Sys.command cmd with ++ match Stdlib.Sys.command cmd with + | 0 -> () + | other -> Fmt.kstr failwith "Command %S did not return 0: %d" cmd other + ) + fmt + + let write_lines p l = +- let open Caml in ++ let open Stdlib.in + let o = open_out p in + Base.List.iter l ~f:(Printf.fprintf o "%s\n") ; + close_out o +@@ -427,7 +427,7 @@ let () = + Fmt.kstr + (fun s -> + Fmt.epr "Wrong CLI: %s\n%!" s ; +- Caml.exit 2 ) ++ Stdlib.exit 2 ) + fmt in + let example = ref None in + let path = ref None in +@@ -458,7 +458,7 @@ let () = + with + | Some s -> s + | None -> fail "Don't know VM %S" arg ) in +- let module Arg = Caml.Arg in ++ let module Arg = Stdlib.Arg in + let args = + Arg.align + [ ( "--ssh-port" +diff --git a/src/lib/EDSL.ml b/src/lib/EDSL.ml +index 9663489..9d31805 100644 +--- a/src/lib/EDSL.ml ++++ b/src/lib/EDSL.ml +@@ -5,7 +5,7 @@ type c_string = Language.c_string + type byte_array = Language.byte_array + type fd_redirection = Language.fd_redirection + +-let ( // ) = Caml.Filename.concat ++let ( // ) = Stdlib.Filename.concat + + open Language.Construct + include Language.Construct.Base +@@ -109,7 +109,7 @@ let tmp_file ?tmp_dir name : file = + [ get_tmp_dir; str "/" + ; str + (Fmt.str "genspio-tmp-file-%s-%s" clean +- Caml.Digest.(string name |> to_hex) ) ] in ++ Stdlib.Digest.(string name |> to_hex) ) ] in + let tmp = Str.concat_list [path; string "-tmp"] in + object (_self) + method get = get_stdout (call [string "cat"; path]) +@@ -172,7 +172,7 @@ module Command_line = struct + let variable {switches; _} = + Fmt.str "%s_%s" prefix + ( String.concat ~sep:"" switches +- |> Caml.Digest.string |> Caml.Digest.to_hex ) in ++ |> Stdlib.Digest.string |> Stdlib.Digest.to_hex ) in + let inits = ref [] in + let to_init s = inits := s :: !inits in + let cases = ref [] in +@@ -331,7 +331,7 @@ let fresh_name suf = + object + method v = 42 + end in +- Fmt.str "g-%d-%d-%s" (Caml.Oo.id x) (Random.int 100_000) suf ++ Fmt.str "g-%d-%d-%s" (Stdlib.Oo.id x) (Random.int 100_000) suf + + let sanitize_name n = + String.map n ~f:(function +diff --git a/src/lib/EDSL_v0.ml b/src/lib/EDSL_v0.ml +index 1ac12de..dd82023 100644 +--- a/src/lib/EDSL_v0.ml ++++ b/src/lib/EDSL_v0.ml +@@ -5,7 +5,7 @@ type c_string = Language.c_string + type byte_array = Language.byte_array + type fd_redirection = Language.fd_redirection + +-let ( // ) = Caml.Filename.concat ++let ( // ) = Stdlib.Filename.concat + + include Language.Construct + +@@ -63,7 +63,7 @@ let tmp_file ?tmp_dir name : file = + [ get_tmp_dir; c_string "/" + ; c_string + (Fmt.str "genspio-tmp-file-%s-%s" clean +- Caml.Digest.(string name |> to_hex) ) ] in ++ Stdlib.Digest.(string name |> to_hex) ) ] in + let tmp = C_string.concat_list [path; string "-tmp"] in + object (self) + method get = get_stdout (call [string "cat"; path]) +@@ -127,7 +127,7 @@ module Command_line = struct + let variable {switches; _} = + Fmt.str "%s_%s" prefix + ( String.concat ~sep:"" switches +- |> Caml.Digest.string |> Caml.Digest.to_hex ) in ++ |> Stdlib.Digest.string |> Stdlib.Digest.to_hex ) in + let inits = ref [] in + let to_init s = inits := s :: !inits in + let cases = ref [] in +@@ -139,7 +139,7 @@ module Command_line = struct + let bool_of_var var = getenv (string var) |> Bool.of_string in + let anon_tmp = + Fmt.kstr tmp_file "parse-cli-%s" +- Caml.(Marshal.to_string options [] |> Digest.string |> Digest.to_hex) ++ Stdlib.(Marshal.to_string options [] |> Digest.string |> Digest.to_hex) + in + let anon = anon_tmp#get |> Elist.deserialize_to_c_string_list in + let applied_action = +@@ -293,7 +293,7 @@ let fresh_name suf = + object + method v = 42 + end in +- Fmt.str "g-%d-%d-%s" (Caml.Oo.id x) (Random.int 100_000) suf ++ Fmt.str "g-%d-%d-%s" (Stdlib.Oo.id x) (Random.int 100_000) suf + + let sanitize_name n = + String.map n ~f:(function +diff --git a/src/lib/common.ml b/src/lib/common.ml +index fe9cfee..d98d697 100644 +--- a/src/lib/common.ml ++++ b/src/lib/common.ml +@@ -4,7 +4,7 @@ module Unique_name = struct + let x = ref 0 + + let create prefix = +- Caml.incr x ; ++ Stdlib.incr x ; + Fmt.str "%s_%d_%d" prefix !x (Random.int 100_000) + + let variable = create +diff --git a/src/lib/compile.ml b/src/lib/compile.ml +index 12cc836..d365e37 100644 +--- a/src/lib/compile.ml ++++ b/src/lib/compile.ml +@@ -53,7 +53,7 @@ module To_posix = struct + (fun ppf s -> pf ppf "@[`%s`@]" s) ) + more ) + () +- |> Caml.Filename.quote in ++ |> Stdlib.Filename.quote in + str " printf -- '%%s\\n' %s >&2 " msg_str + + let one_liner = +@@ -116,7 +116,7 @@ let to_many_lines ?max_argument_length ?no_trap e = + to_legacy `Multi_line ?max_argument_length ?no_trap e + + let quick_run_exn ?max_argument_length ?no_trap e = +- match to_many_lines ?max_argument_length ?no_trap e |> Caml.Sys.command with ++ match to_many_lines ?max_argument_length ?no_trap e |> Stdlib.Sys.command with + | 0 -> () + | other -> Fmt.failwith "Command returned %d" other + +@@ -125,7 +125,7 @@ let to_string_hum e = Fmt.str "%a" pp_hum e + + let to_one_line_hum e = + let buf = Buffer.create 42 in +- let formatter = Caml.Format.formatter_of_buffer buf in +- Caml.Format.pp_set_margin formatter 10_000_000 ; +- Caml.Format.fprintf formatter "@[%a@]@?" pp_hum e ; ++ let formatter = Stdlib.Format.formatter_of_buffer buf in ++ Stdlib.Format.pp_set_margin formatter 10_000_000 ; ++ Stdlib.Format.fprintf formatter "@[%a@]@?" pp_hum e ; + Buffer.contents buf +diff --git a/src/lib/language.ml b/src/lib/language.ml +index cf7b810..6f71027 100644 +--- a/src/lib/language.ml ++++ b/src/lib/language.ml +@@ -1,7 +1,7 @@ + open Common + + (* Here we use the legacy module (too much code to change at once): *) +-module Format = Caml.Format ++module Format = Stdlib.Format + + type c_string = C_string + type byte_array = Byte_Array +diff --git a/src/lib/standard_compiler.ml b/src/lib/standard_compiler.ml +index 7e639c6..bc8848b 100644 +--- a/src/lib/standard_compiler.ml ++++ b/src/lib/standard_compiler.ml +@@ -147,7 +147,7 @@ let rec to_ir : type a. _ -> _ -> a Language.t -> internal_representation = + match c_str with + | Byte_array_to_c_string (Literal (Literal.String s)) + when Literal.Str.easy_to_escape s -> +- argument (Caml.Filename.quote s |> check_length) ++ argument (Stdlib.Filename.quote s |> check_length) + | Byte_array_to_c_string (Literal (Literal.String s)) + when Literal.Str.impossible_to_escape_for_variable s -> + error ~comment_backtrace:comments (`Not_a_c_string s) +diff --git a/src/lib/to_slow_flow.ml b/src/lib/to_slow_flow.ml +index e1305ce..0f812aa 100644 +--- a/src/lib/to_slow_flow.ml ++++ b/src/lib/to_slow_flow.ml +@@ -33,10 +33,10 @@ let expand_octal_command ~remove_l s = + let m = ref 0 + + let var_name ?expression ?script tag = +- Caml.incr m ; ++ Stdlib.incr m ; + let stag = String.map tag ~f:(function '-' -> '_' | a -> a) in + Fmt.str "genspio_%s_%d_%d_%s" stag (Random.int 100_000_000) !m +- Caml.( ++ Stdlib.( + Marshal.to_string (expression, script) [Marshal.Closures] + |> Digest.string |> Digest.to_hex) + +@@ -49,7 +49,7 @@ module Tmp_db = struct + let make ?(deletion_grouping = 20) how = + let default_tmpdir = + match how with +- | `Fresh -> Caml.Filename.concat "/tmp" (var_name "tmpdir") ++ | `Fresh -> Stdlib.Filename.concat "/tmp" (var_name "tmpdir") + | `Use p -> p in + {default_tmpdir; tmp_file_db= []; deletion_grouping} + +@@ -122,10 +122,10 @@ module Script = struct + let v = Fmt.str "$(%s)" (expand_octal_command ~remove_l:false oct) in + if not arithmetic then Fmt.str "\"%s\"" v else v + | Literal_value s -> +- let v = Caml.Filename.quote s in ++ let v = Stdlib.Filename.quote s in + if arithmetic then Fmt.str "$(printf -- %s)" v else v + | File s -> +- let v = Fmt.str "$(cat %s)" (Caml.Filename.quote s) in ++ let v = Fmt.str "$(cat %s)" (Stdlib.Filename.quote s) in + if not arithmetic then Fmt.str "\"%s\"" v else v + | Tmp_file_in_variable s -> + (* Parameters.(tmp_file_db := s :: !tmp_file_db) ; *) +@@ -150,7 +150,7 @@ module Script = struct + | Literal_value s -> string_to_octal s + | File f -> + Fmt.str "$(cat %s | od -t o1 -An -v | tr -d ' \\n')" +- (Caml.Filename.quote f) ++ (Stdlib.Filename.quote f) + | Tmp_file_in_variable f -> + (* Parameters.(tmp_file_db := f :: !tmp_file_db) ; *) + Fmt.str "$(cat \"${%s}\" | od -t o1 -An -v | tr -d ' \\n')" f +@@ -162,7 +162,7 @@ module Script = struct + | Unit -> assert false + | Raw_inline s -> s + | Literal_value _ -> assert false +- | File f -> Caml.Filename.quote f ++ | File f -> Stdlib.Filename.quote f + | Tmp_file_in_variable f -> + (* Parameters.(tmp_file_db := f :: !tmp_file_db) ; *) + Fmt.str "\"${%s}\"" f +@@ -343,7 +343,7 @@ let rec to_ir : type a. fail_commands:_ -> tmpdb:_ -> a t -> Script.t = + let esc = string_to_octal v ~prefix:"\\" in + mk (rawf "printf -- '%s' > %s" esc tmparg, tmp) + | Literal_value v -> +- mk (rawf "printf -- '%%s' %s > %s" (Caml.Filename.quote v) tmparg, tmp) ++ mk (rawf "printf -- '%%s' %s > %s" (Stdlib.Filename.quote v) tmparg, tmp) + | File p -> mk (rawf ":", make [] (File p)) + | Tmp_file_in_variable p -> mk (rawf "cp \"${%s}\" %s" p tmparg, tmp) + | Raw_inline s -> mk (rawf "printf -- '%%s' %s > %s" s tmparg, tmp) +@@ -725,7 +725,7 @@ let compile ?(default_tmpdir = `Fresh) ?(signal_name = "USR1") + let fail_commands s = + match trap with + | `Exit_with _ -> +- [ rawf "printf '%%s\\n' %s > %s " (Caml.Filename.quote s) tmparg ++ [ rawf "printf '%%s\\n' %s > %s " (Stdlib.Filename.quote s) tmparg + ; rawf "kill -s %s ${%s}" signal_name pid ] + | `None -> + failwith "You cannot use the `fail` construct with no `trap` strategy" +@@ -851,9 +851,9 @@ let test () = + let ir = compile expr in + fprintf std_formatter "==== TEST %d ====\n%a\n%!" idx Script.pp_posix ir ; + let script_file = Fmt.str "/tmp/script-%d.sh" idx in +- let o = Caml.open_out script_file in ++ let o = Stdlib.open_out script_file in + fprintf (formatter_of_out_channel o) "\n%a\n%!" Script.pp_posix ir ; +- Caml.flush o ; +- Caml.close_out o ; +- let res = Fmt.kstr Caml.Sys.command "sh %s" script_file in ++ Stdlib.flush o ; ++ Stdlib.close_out o ; ++ let res = Fmt.kstr Stdlib.Sys.command "sh %s" script_file in + fprintf std_formatter "\nRESULT: %d\n" res ) +diff --git a/src/lib/transform.ml b/src/lib/transform.ml +index a1f16a3..78bb202 100644 +--- a/src/lib/transform.ml ++++ b/src/lib/transform.ml +@@ -370,7 +370,7 @@ module Constant_propagation = struct + let count = ref 0 in + let check ?trace name e res = + let p = process ?trace e in +- Caml.incr count ; ++ Stdlib.incr count ; + match Poly.(p = res) with + | true -> () + | false -> +diff --git a/src/test-lib/test_lib.ml b/src/test-lib/test_lib.ml +index eba7adf..ecf765d 100644 +--- a/src/test-lib/test_lib.ml ++++ b/src/test-lib/test_lib.ml +@@ -1,9 +1,9 @@ + open! Base + +-let ( // ) = Caml.Filename.concat ++let ( // ) = Stdlib.Filename.concat + +-module Filename = Caml.Filename +-module Sys = Caml.Sys ++module Filename = Stdlib.Filename ++module Sys = Stdlib.Sys + + module Test = struct + type t = +@@ -82,7 +82,7 @@ module Shell_directory = struct + if String.length long > 30 then String.sub long ~pos:0 ~len:30 + else long ) + (List.length args) returns +- Caml.( ++ Stdlib.( + Marshal.to_string script [Marshal.Closures] + |> Digest.string |> Digest.to_hex + |> fun s -> String.sub s 0 10) +@@ -358,9 +358,9 @@ module Example = struct + ( match Genspio.Compile.To_posix.(string ~options:multi_line) code with + | Ok script -> + let tmp = Filename.temp_file "genspio-example" ".sh" in +- let o = Caml.open_out tmp in +- Caml.Printf.fprintf o "\n%s\n" script ; +- Caml.close_out o ; ++ let o = Stdlib.open_out tmp in ++ Stdlib.Printf.fprintf o "\n%s\n" script ; ++ Stdlib.close_out o ; + (* ff fmt "@[* Compiled:@ `%s`@ (%d bytes)@]@\n" tmp (String.length script); *) + let out = Filename.temp_file "genspio-example" ".out" in + let err = Filename.temp_file "genspio-example" ".err" in +@@ -371,10 +371,10 @@ module Example = struct + let show_file name path = + let fence = String.make 50 '`' in + ff fmt "@\n%s:@\n@\n%s@\n" name fence ; +- let i = Caml.open_in path in ++ let i = Stdlib.open_in path in + let rec loop () = + try +- ff fmt "%c" @@ Caml.input_char i ; ++ ff fmt "%c" @@ Stdlib.input_char i ; + loop () + with _ -> () in + loop () ; ff fmt "@\n%s@\n@\n" fence in +diff --git a/src/test/main.ml b/src/test/main.ml +index 3374bdf..44d4e3f 100644 +--- a/src/test/main.ml ++++ b/src/test/main.ml +@@ -1,5 +1,5 @@ + open! Base +-module Filename = Caml.Filename ++module Filename = Stdlib.Filename + open Tests.Test_lib + module Compile = Genspio.Language + module Construct = Genspio.EDSL_v0 +@@ -635,7 +635,7 @@ let () = + @@ exits ~name:"getenv" 25 + (let open Construct in + let alternate_get_env v = +- (* We cannot use OCaml's Sys.getenv because the compilation output may ++ (* We cannot use OStdlib.s Sys.getenv because the compilation output may + be run on a different host/system (through SSH or alike). *) + exec ["sh"; "-c"; Fmt.str "echo ${%s} | tr -d '\\n'" v] + |> get_stdout |> Byte_array.to_c in +@@ -1224,14 +1224,14 @@ let () = + Fmt.kstr + (fun s -> + Fmt.epr "Error: %s\nUsage: %s\n%!" s usage ; +- Caml.exit 1 ) ++ Stdlib.exit 1 ) + fmt in + let anon_fun p = anon := p :: !anon in + let no_compilation_tests = ref false in + let extra_slow_flow_tests = ref false in + let extra_transform_cp_tests = ref false in + let filter_tests = ref None in +- let module Arg = Caml.Arg in ++ let module Arg = Stdlib.Arg in + let args = + Arg.align + [ ( "--important-shells" +@@ -1294,13 +1294,13 @@ let () = + let todo = Test_directory.contents testdir ~path testlist in + List.iter todo ~f:(function + | `File (p, v) -> +- let mo = Caml.open_out p in +- Caml.Printf.fprintf mo "%s\n" v ; +- Caml.close_out mo ++ let mo = Stdlib.open_out p in ++ Stdlib.Printf.fprintf mo "%s\n" v ; ++ Stdlib.close_out mo + | `Directory v -> Fmt.kstr Sys.command "mkdir -p '%s'" v |> ignore ) ) ; + let errors = + if !no_compilation_tests then false else compilation_error_tests () in + if !extra_slow_flow_tests then Genspio.To_slow_flow.test () ; + if !extra_transform_cp_tests then + Genspio.Transform.Constant_propagation.test () ; +- Caml.exit (if errors then 23 else 0) ++ Stdlib.exit (if errors then 23 else 0) diff --git a/pkgs/development/ocaml-modules/janestreet/0.17.nix b/pkgs/development/ocaml-modules/janestreet/0.17.nix new file mode 100644 index 000000000000..35f49bf6d02f --- /dev/null +++ b/pkgs/development/ocaml-modules/janestreet/0.17.nix @@ -0,0 +1,1985 @@ +{ + self, + bash, + fzf, + lib, + openssl, + zstd, +}: + +with self; + +{ + + abstract_algebra = janePackage { + pname = "abstract_algebra"; + hash = "sha256-W2rSSbppNkulCgGeTiovzP5zInPWIVfflDxWkGpEOFA="; + meta.description = "A small library describing abstract algebra concepts"; + propagatedBuildInputs = [ + base + ppx_jane + ]; + }; + + accessor = janePackage { + pname = "accessor"; + hash = "sha256-1inoFwDDhnfhW+W3aAkcFNUkf5Umy8BDGDEbMty+Fts="; + meta.description = "A library that makes it nicer to work with nested functional data structures"; + propagatedBuildInputs = [ higher_kinded ]; + }; + + accessor_async = janePackage { + pname = "accessor_async"; + hash = "sha256-EYyxZur+yshYaX1EJbWc/bCaAa9PDKiuK87fIeqhspo="; + meta.description = "Accessors for Async types, for use with the Accessor library"; + propagatedBuildInputs = [ + accessor_core + async_kernel + ]; + }; + + accessor_base = janePackage { + pname = "accessor_base"; + hash = "sha256-6LJ8dKPAuaxWinArkPl4OE0eYPqvM7+Ao6jff8jhjXc="; + meta.description = "Accessors for Base types, for use with the Accessor library"; + propagatedBuildInputs = [ ppx_accessor ]; + }; + + accessor_core = janePackage { + pname = "accessor_core"; + hash = "sha256-ku83ZfLtVI8FvQhrKcnJmhmoNlYcVMKx1tor5N8Nq7M="; + meta.description = "Accessors for Core types, for use with the Accessor library"; + propagatedBuildInputs = [ + accessor_base + core_kernel + ]; + }; + + async = janePackage { + pname = "async"; + hash = "sha256-CwRPH5tFZHJqptdmNwdZvKvSJ1Qr21gV1jaxsa/vFBU="; + meta.description = "Monadic concurrency library"; + propagatedBuildInputs = [ + async_rpc_kernel + async_log + async_unix + textutils + ]; + doCheck = false; # we don't have netkit_sockets + }; + + async_durable = janePackage { + pname = "async_durable"; + hash = "sha256-CAU54j3K47p4hQqAtHJYuAQ0IvZPMQZKFp5J7G+xtjM="; + meta.description = "Durable connections for use with async"; + propagatedBuildInputs = [ + async_kernel + async_rpc_kernel + core + core_kernel + ppx_jane + ]; + }; + + async_extra = janePackage { + pname = "async_extra"; + hash = "sha256-rZUROyYrvtgnI+leTMXuGcw71MfVhqdkfp9EIhAFUnM="; + meta.description = "Monadic concurrency library"; + propagatedBuildInputs = [ async_kernel ]; + }; + + async_find = janePackage { + pname = "async_find"; + hash = "sha256-byvLJvhq7606gKP1kjLRYe3eonkAG3Vz6wQcsjJOiOE="; + meta.description = "Directory traversal with Async"; + propagatedBuildInputs = [ async ]; + }; + + async_inotify = janePackage { + pname = "async_inotify"; + hash = "sha256-608G8OKQxqrQdYc1Cfrd8g8WLX6QwSeMUz8ORuSbmA8="; + meta.description = "Async wrapper for inotify"; + propagatedBuildInputs = [ + async_find + inotify + ]; + }; + + async_interactive = janePackage { + pname = "async_interactive"; + hash = "sha256-hC7mLDLtvIEMKLMeDOC5ADiAGJlJqYF35RDI+porsKA="; + meta.description = "Utilities for building simple command-line based user interfaces"; + propagatedBuildInputs = [ async ]; + }; + + async_js = janePackage { + pname = "async_js"; + hash = "sha256-4t7dJ04lTQ0b6clf8AvtyC8ip43vIcEBXgHJLiRbuGM="; + meta.description = "A small library that provide Async support for JavaScript platforms"; + buildInputs = [ js_of_ocaml-ppx ]; + propagatedBuildInputs = [ + async_rpc_kernel + js_of_ocaml + uri-sexp + ]; + }; + + async_kernel = janePackage { + pname = "async_kernel"; + hash = "sha256-fEbo7EeOJHnBqTYvC/o2a2x69XPnANbe15v/yv29l/4="; + meta.description = "Monadic concurrency library"; + propagatedBuildInputs = [ core_kernel ]; + }; + + async_log = janePackage { + pname = "async_log"; + hash = "sha256-XeWC3oC0n4or3EDLrNLWXMWhyhH6kcah0Mdb56rZ5lA="; + meta.description = "Logging library built on top of Async_unix"; + propagatedBuildInputs = [ + async_kernel + async_unix + core + core_kernel + ppx_jane + timezone + ]; + }; + + async_rpc_kernel = janePackage { + pname = "async_rpc_kernel"; + hash = "sha256-zSqmRgybvWhS9XiNIqgxUjQU8xc9aXM69ZaBq4+r+HA="; + meta.description = "Platform-independent core of Async RPC library"; + propagatedBuildInputs = [ + async_kernel + protocol_version_header + ]; + }; + + async_rpc_websocket = janePackage { + pname = "async_rpc_websocket"; + hash = "sha256-pbgG872Av6rX/CH2sOKgTVR42XpP0xhzdR/Bqoq7bSU="; + meta.description = "Library to serve and dispatch Async RPCs over websockets"; + propagatedBuildInputs = [ + async_rpc_kernel + async_websocket + cohttp_async_websocket + ]; + }; + + async_sendfile = janePackage { + pname = "async_sendfile"; + hash = "sha256-x2chts7U9hoGW6uvyfpHMkSwCx1JXhHX601Xg92Wk3U="; + meta.description = "Thin wrapper around [Linux_ext.sendfile] to send full files"; + propagatedBuildInputs = [ async_unix ]; + }; + + async_shell = janePackage { + pname = "async_shell"; + hash = "sha256-/wqfuKiQQufs/KhNtBn8C9AzX7GbP8s8cyWGynJ0m1M="; + meta.description = "Shell helpers for Async"; + propagatedBuildInputs = [ + async + shell + ]; + }; + + async_smtp = janePackage { + pname = "async_smtp"; + hash = "sha256-RWtbg6Vpp71ock8Duya5j9Y89OUY4wRXh0pDOxM1NT4="; + meta.description = "SMTP client and server"; + propagatedBuildInputs = [ + async_extra + async_inotify + async_sendfile + async_shell + async_ssl + email_message + resource_cache + re2_stable + sexp_macro + ]; + }; + + async_ssl = janePackage { + pname = "async_ssl"; + hash = "sha256-7obEoeckwydi2wHBkBmX0LynY1QVCb3sQ/U945eteJo="; + meta.description = "Async wrappers for SSL"; + buildInputs = [ dune-configurator ]; + propagatedBuildInputs = [ + async + ctypes + ctypes-foreign + openssl + ]; + }; + + async_unix = janePackage { + pname = "async_unix"; + hash = "sha256-fA1e5AnNe/tMTMZ60jtGUofRi4rh+MmVx81kfhfaBaQ="; + meta.description = "Monadic concurrency library"; + propagatedBuildInputs = [ + async_kernel + core_unix + cstruct + ]; + }; + + async_websocket = janePackage { + pname = "async_websocket"; + hash = "sha256-22N+QO9hpkKHv3n9WkvtmJouxb/nuauv1UXdVV0zOGA="; + meta.description = "A library that implements the websocket protocol on top of Async"; + propagatedBuildInputs = [ + async + cryptokit + ]; + }; + + babel = janePackage { + pname = "babel"; + hash = "sha256-mRSlLXtaGj8DcdDZGUZbi16qQxtfb+fXkwxz6AXxN3o="; + meta.description = "A library for defining Rpcs that can evolve over time without breaking backward compatibility"; + propagatedBuildInputs = [ + async_rpc_kernel + core + ppx_jane + streamable + tilde_f + ]; + }; + + base = janePackage { + pname = "base"; + version = "0.17.1"; + hash = "sha256-5wqBpOHhiIy9JUuxb3OnpZHrHSM7VODuLSihaIyeFn0="; + meta.description = "Full standard library replacement for OCaml"; + buildInputs = [ dune-configurator ]; + propagatedBuildInputs = [ + sexplib0 + ocaml_intrinsics_kernel + ]; + checkInputs = [ alcotest ]; + }; + + base_bigstring = janePackage { + pname = "base_bigstring"; + hash = "sha256-tGDtkVOU10GzNsJ4wZtbqyIMjY5lHM4+rA3+w34TYOE="; + meta.description = "String type based on [Bigarray], for use in I/O and C-bindings"; + propagatedBuildInputs = [ + int_repr + ppx_jane + ]; + }; + + base_trie = janePackage { + pname = "base_trie"; + hash = "sha256-KuVDLJiEIjbvLCNI51iFLlsMli+hspWMyhrMk5pSL58="; + meta.description = "Trie data structure library"; + propagatedBuildInputs = [ + base + core + expect_test_helpers_core + ppx_jane + ]; + }; + + base_quickcheck = janePackage { + pname = "base_quickcheck"; + hash = "sha256-jDxO+/9Qnntt6ZNX1xvaWvoJ0JpnPqeq8X8nsYpeqsY="; + meta.description = "Randomized testing framework, designed for compatibility with Base"; + propagatedBuildInputs = [ + ppx_base + ppx_fields_conv + ppx_let + ppx_sexp_value + splittable_random + ]; + }; + + bidirectional_map = janePackage { + pname = "bidirectional_map"; + hash = "sha256-LnslyNdgQpa9DOAkwb0qq9/NdRvKNocUTIP+Dni6oYc="; + meta.description = "A library for bidirectional maps and multimaps"; + }; + + bignum = janePackage { + pname = "bignum"; + hash = "sha256-QhVEZ97n/YUBBXYCshDa5UnZpv0BKK6xRN1kXabY3Es="; + propagatedBuildInputs = [ + core_kernel + zarith + zarith_stubs_js + ]; + meta.description = "Core-flavoured wrapper around zarith's arbitrary-precision rationals"; + }; + + bin_prot = janePackage { + pname = "bin_prot"; + hash = "sha256-5QeK8Cdu+YjNE/MLiQps6SSf5bRJ/eYZYsJH7oYSarg="; + meta.description = "A binary protocol generator"; + propagatedBuildInputs = [ + ppx_compare + ppx_custom_printf + ppx_fields_conv + ppx_optcomp + ppx_stable_witness + ppx_variants_conv + ]; + postPatch = '' + patchShebangs xen/cflags.sh + ''; + }; + + bonsai = janePackage { + pname = "bonsai"; + hash = "sha256-rr87o/w/a6NtCrDIIYmk2a5IZ1WJM/qJUeDqTLN1Gr4="; + meta.description = "A library for building dynamic webapps, using Js_of_ocaml"; + buildInputs = [ ppx_pattern_bind ]; + nativeBuildInputs = [ + ppx_css + js_of_ocaml-compiler + ocaml-embed-file + ]; + propagatedBuildInputs = [ + async + async_durable + async_extra + async_rpc_websocket + babel + cohttp-async + core_bench + fuzzy_match + incr_dom + indentation_buffer + js_of_ocaml-ppx + ordinal_abbreviation + patdiff + polling_state_rpc + ppx_css + ppx_quick_test + ppx_typed_fields + profunctor + sexp_grammar + textutils + versioned_polling_state_rpc + ]; + }; + + capitalization = janePackage { + pname = "capitalization"; + hash = "sha256-wq8SO+SXF+UQhSu+ElVYv9erZ8S54G3SzJd0HX/Vwyk="; + meta.description = "Naming conventions for multiple-word identifiers"; + propagatedBuildInputs = [ + base + ppx_base + ]; + }; + + cinaps = janePackage { + pname = "cinaps"; + version = "0.15.1"; + hash = "sha256-LycruanldSP251uYJjQqIfI76W0UQ6o5i5u8XjszBT0="; + meta.description = "Trivial metaprogramming tool"; + minimalOCamlVersion = "4.04"; + propagatedBuildInputs = [ re ]; + # doCheck fails because ppx_base doesn't include ppx_js_style, and this is + # needed for the ppx executable to parse `-allow-toplevel-expression` flag. + doCheck = false; + }; + + codicons = janePackage { + pname = "codicons"; + hash = "sha256-S4VrMObA5+SNeL/XsWU6SoSD/0TVvuqHjthUaQCDoRU="; + meta.description = "Icons from VS code"; + propagatedBuildInputs = [ + core + ppx_jane + virtual_dom + ]; + }; + + cohttp_async_websocket = janePackage { + pname = "cohttp_async_websocket"; + hash = "sha256-0InGCF34LWQes9S4OgbR6w+6cylThYuj1Dj0aQyTnuY="; + meta.description = "Websocket library for use with cohttp and async"; + propagatedBuildInputs = [ + async_websocket + cohttp-async + ppx_jane + uri-sexp + ]; + }; + + cohttp_static_handler = janePackage { + pname = "cohttp_static_handler"; + hash = "sha256-RB/sUq1tL8A3m9YhHHx2LFqoExTX187VeZI9MRb1NeA="; + meta.description = "A library for easily creating a cohttp handler for static files"; + propagatedBuildInputs = [ cohttp-async ]; + }; + + content_security_policy = janePackage { + pname = "content_security_policy"; + hash = "sha256-AQN2JJA+5B0PERNNOA9FXX6rIeej40bwJtQmHP6GKw4="; + meta.description = "A library for building content-security policies"; + propagatedBuildInputs = [ + base64 + cryptokit + core + ppx_jane + ]; + }; + + core = janePackage { + pname = "core"; + version = "0.17.1"; + hash = "sha256-XkABcvglVJLVnWJmvfr5eVywyclPSDqanVOLQNqdNtQ="; + meta.description = "Industrial strength alternative to OCaml's standard library"; + buildInputs = [ jst-config ]; + propagatedBuildInputs = [ + base + base_bigstring + base_quickcheck + ppx_diff + ppx_jane + time_now + ]; + }; + + core_bench = janePackage { + pname = "core_bench"; + hash = "sha256-oXE3FuCCIbX2M0r4Ds2BMUU6g1bqe9E87lDo2CcMtMU="; + meta.description = "Benchmarking library"; + propagatedBuildInputs = [ + core_extended + delimited_parsing + textutils + ]; + }; + + core_extended = janePackage { + pname = "core_extended"; + hash = "sha256-Xl6czD1gdnvHkXDz+qa7TWZq6dm8wlDqywxEIi2R6bI="; + meta.description = "Extra components that are not as closely vetted or as stable as Core"; + propagatedBuildInputs = [ + core_unix + record_builder + ]; + }; + + core_kernel = janePackage { + pname = "core_kernel"; + hash = "sha256-l7U0edUCNHTroYMBHiEMDx5sl7opEmmmeo2Z06tCMts="; + meta.description = "System-independent part of Core"; + buildInputs = [ jst-config ]; + propagatedBuildInputs = [ + base_bigstring + core + int_repr + sexplib + uopt + ]; + doCheck = false; # we don't have quickcheck_deprecated + }; + + core_unix = janePackage { + pname = "core_unix"; + hash = "sha256-eqBMiEJ5xUrgFJTMZoEDxqkhedQxxbbf0DedZKHprww="; + meta.description = "Unix-specific portions of Core"; + buildInputs = [ jst-config ]; + propagatedBuildInputs = [ + core_kernel + expect_test_helpers_core + ocaml_intrinsics + ppx_jane + timezone + spawn + ]; + postPatch = '' + patchShebangs unix_pseudo_terminal/src/discover.sh + ''; + doCheck = false; # command_validate_parsing.exe is not specified in test build deps + }; + + csvfields = janePackage { + pname = "csvfields"; + hash = "sha256-hCH2NGQIRTU5U3TUOYHao6Kz5PhnLbySmzic4ytppEc="; + propagatedBuildInputs = [ + core + num + ]; + meta.description = "Runtime support for ppx_xml_conv and ppx_csv_conv"; + }; + + dedent = janePackage { + pname = "dedent"; + hash = "sha256-Scir/gaIhmNowXZ0tv57M/Iv1GXQIkyDks1sU1DAoIQ="; + propagatedBuildInputs = [ + base + ppx_jane + stdio + ]; + meta.description = "A library for improving redability of multi-line string constants in code"; + }; + + delimited_parsing = janePackage { + pname = "delimited_parsing"; + hash = "sha256-bgt99kQvaU7FPK1+K1UOAUbSaaaCB1DV23Cuo3A68M0="; + propagatedBuildInputs = [ + async + core_extended + ]; + meta.description = "Parsing of character (e.g., comma) separated and fixed-width values"; + }; + + legacy_diffable = janePackage { + pname = "legacy_diffable"; + hash = "sha256-wUSG04bHCnwqXpWKgkceAORs1inxexiPKZIR9fEVmCo="; + propagatedBuildInputs = [ + core + ppx_jane + stored_reversed + streamable + ]; + meta.description = "An interface for diffs"; + }; + + ecaml = janePackage { + pname = "ecaml"; + hash = "sha256-CEroXMEIAfvXD603bnIVwzcrE3KbVaOOhGZastkQcdU="; + meta.description = "Library for writing Emacs plugin in OCaml"; + propagatedBuildInputs = [ + async + expect_test_helpers_core + ]; + }; + + email_message = janePackage { + pname = "email_message"; + hash = "sha256-1OJ6bQb/rdyfAgMyuKT/ylpa8qBldZV5kEm0B45Ej1w="; + meta.description = "E-mail message parser"; + propagatedBuildInputs = [ + angstrom + async + base64 + cryptokit + magic-mime + re2 + ]; + }; + + env_config = janePackage { + pname = "env_config"; + hash = "sha256-vG309p7xqanTnrnHBwvuCO3YD4tVbTNa7F1F9sZDZE0="; + meta.description = "Helper library for retrieving configuration from an environment variable"; + propagatedBuildInputs = [ + async + core + core_unix + ppx_jane + ]; + }; + + expect_test_helpers_async = janePackage { + pname = "expect_test_helpers_async"; + hash = "sha256-oInNgNISqOrmQUXVxzjDy+mS06yPEeFPGIvaKnCETjk="; + meta.description = "Async helpers for writing expectation tests"; + propagatedBuildInputs = [ + async + expect_test_helpers_core + ]; + }; + + expect_test_helpers_core = janePackage { + pname = "expect_test_helpers_core"; + hash = "sha256-vnlDZ8k3JFCdN6WGiaG9OEEdQJnw0/eMogFCfTXIu2Y="; + meta.description = "Helpers for writing expectation tests"; + propagatedBuildInputs = [ + core_kernel + sexp_pretty + ]; + }; + + fieldslib = janePackage { + pname = "fieldslib"; + hash = "sha256-Zfnc32SghjZYTlnSdo6JPm4WCb7BPVjrWNDfeMZHaiU="; + meta.description = "Syntax extension to define first class values representing record fields, to get and set record fields, iterate and fold over all fields of a record and create new record values"; + propagatedBuildInputs = [ base ]; + }; + + file_path = janePackage { + pname = "file_path"; + hash = "sha256-XSLfYasn6qMZmDzAUGssOM9EX09n2W9/imTgNoSBEyk="; + meta.description = "A library for typed manipulation of UNIX-style file paths"; + propagatedBuildInputs = [ + async + core + core_kernel + core_unix + expect_test_helpers_async + expect_test_helpers_core + ppx_jane + ]; + }; + + fuzzy_match = janePackage { + pname = "fuzzy_match"; + hash = "sha256-XB1U4mY0LcdsKYRnmV0SR4ODTIZynZetBk5X5SdHs44="; + meta.description = "A library for fuzzy string matching"; + propagatedBuildInputs = [ + core + ppx_jane + ]; + }; + + fzf = janePackage { + pname = "fzf"; + hash = "sha256-yHdvC3cB5sVXsZQbtNzUZkaaqOe/7y8pDHgLwugAlQg="; + meta.description = "A library for running the fzf command line tool"; + propagatedBuildInputs = [ + async + core_kernel + ppx_jane + ]; + postPatch = '' + substituteInPlace src/fzf.ml --replace /usr/bin/fzf ${fzf}/bin/fzf + ''; + }; + + gel = janePackage { + pname = "gel"; + hash = "sha256-zGDlxbJINXD1qG7EifZGDfKbQpehdHyR/WLRJRYlwUg="; + meta.description = "A library to mark non-record fields global"; + propagatedBuildInputs = [ + base + ppx_jane + ]; + }; + + hex_encode = janePackage { + pname = "hex_encode"; + hash = "sha256-5DqaCJllphdEreOpzAjT61qb3M6aN9b2xhiUjHVLrvE="; + meta.description = "Hexadecimal encoding library"; + propagatedBuildInputs = [ + core + ppx_jane + ounit + ]; + }; + + higher_kinded = janePackage { + pname = "higher_kinded"; + hash = "sha256-6aZxgGzltRs2aS4MYJh23Gpoqcko6xJxU11T6KixXno="; + meta.description = "A library with an encoding of higher kinded types in OCaml"; + propagatedBuildInputs = [ + base + ppx_jane + ]; + }; + + incr_dom = janePackage { + pname = "incr_dom"; + hash = "sha256-dkF7+aq5Idw1ltDgGEjGYspdmOXjXqv8AA27b4M7U8A="; + meta.description = "A library for building dynamic webapps, using Js_of_ocaml"; + buildInputs = [ js_of_ocaml-ppx ]; + propagatedBuildInputs = [ + async_js + incr_map + incr_select + virtual_dom + ]; + }; + + incr_map = janePackage { + pname = "incr_map"; + hash = "sha256-qNahlxe3Pe1EEcFz1bAKUw3vBaNjgDlahQeuj/+VqbI="; + meta.description = "Helpers for incremental operations on map like data structures"; + buildInputs = [ ppx_pattern_bind ]; + propagatedBuildInputs = [ + abstract_algebra + bignum + legacy_diffable + incremental + streamable + ]; + }; + + incr_select = janePackage { + pname = "incr_select"; + hash = "sha256-/VCNiE8Y7LBL0OHd5V+tB/b3HGKhfSvreU6LZgurYAg="; + meta.description = "Handling of large set of incremental outputs from a single input"; + propagatedBuildInputs = [ incremental ]; + }; + + incremental = janePackage { + pname = "incremental"; + hash = "sha256-siBN36Vv0Bktyxh+8tL6XkUGLqSYMxqvd0UWuTRgAnI="; + meta.description = "Library for incremental computations"; + propagatedBuildInputs = [ + core_kernel + lru_cache + ]; + }; + + indentation_buffer = janePackage { + pname = "indentation_buffer"; + hash = "sha256-/IUZyRkcxUsddzGGIoaLpXbpCxJ1satK79GkzPxSPSc="; + meta.description = "A library for building strings with indentation"; + propagatedBuildInputs = [ + core + ppx_jane + ]; + }; + + int_repr = janePackage { + pname = "int_repr"; + hash = "sha256-yeaAzw95zB1wow9Alg18CU+eemZVxjdLiO/wVRitDwE="; + meta.description = "Integers of various widths"; + propagatedBuildInputs = [ + base + ppx_jane + ]; + }; + + janestreet_cpuid = janePackage { + pname = "janestreet_cpuid"; + hash = "sha256-3ZwEZQSkJJyFW5/+C9x8nW6+GrfVwccNFPlcs7qNcjQ="; + meta.description = "A library for parsing CPU capabilities out of the `cpuid` instruction"; + propagatedBuildInputs = [ + core + core_kernel + ppx_jane + ]; + }; + + janestreet_csv = janePackage { + pname = "janestreet_csv"; + hash = "sha256-at7ywGDaYIDsqhxxLYJhB8a697ccfPtKKI8LvCmRgG8="; + propagatedBuildInputs = [ + async + bignum + core_kernel + core_unix + csvfields + delimited_parsing + fieldslib + numeric_string + ppx_jane + re2 + textutils + tyxml + ocaml_pcre + ]; + meta.description = "Tools for working with CSVs on the command line"; + }; + + jane_rope = janePackage { + pname = "jane_rope"; + hash = "sha256-Lo4+ZUX9R2EGrz4BN+LqdJgVXB3hQqNifgwsjFC1Hfs="; + meta.description = "String representation with cheap concatenation"; + propagatedBuildInputs = [ + base + ppx_jane + ]; + }; + + jane-street-headers = janePackage { + pname = "jane-street-headers"; + hash = "sha256-nEa40utpXA3KiFhp9inWurKyDF4Jw1Jlln6fiW5MAkM="; + meta.description = "Jane Street C header files"; + }; + + js_of_ocaml_patches = janePackage { + pname = "js_of_ocaml_patches"; + hash = "sha256-N61IEZLGfCU3ZX+sw35DAUqUh3u8RaCFcNlXxU1dvL8="; + meta.description = "Additions to js_of_ocaml's standard library that are required by Jane Street libraries"; + propagatedBuildInputs = [ + js_of_ocaml + js_of_ocaml-ppx + ]; + patches = [ ./js_of_ocaml_patches.patch ]; + }; + + jsonaf = janePackage { + pname = "jsonaf"; + hash = "sha256-MMIDHc40cmPpO0n8yREIGMyFndw3NfvGUhy6vHnn40w="; + meta.description = "A library for parsing, manipulating, and serializing data structured as JSON"; + propagatedBuildInputs = [ + base + ppx_jane + angstrom + faraday + ]; + }; + + jst-config = janePackage { + pname = "jst-config"; + hash = "sha256-xwQ+q2Hsduu2vWMWFcjoj3H8Es00N7Mv9LwIZG4hw7c="; + meta.description = "Compile-time configuration for Jane Street libraries"; + buildInputs = [ + dune-configurator + ppx_assert + stdio + ]; + }; + + lru_cache = janePackage { + pname = "janestreet_lru_cache"; + hash = "sha256-/UMSccN9yGAXF7/g6ueSnsfPSnF1fm0zJIRFsThZvH8="; + meta.description = "An LRU Cache implementation"; + propagatedBuildInputs = [ + core_kernel + ppx_jane + ]; + }; + + man_in_the_middle_debugger = janePackage { + pname = "man_in_the_middle_debugger"; + hash = "sha256-ImEzn/EssgW63vdGhLMp4NB/FW0SsCMQ32ZNAs7bDg4="; + meta.description = "Man-in-the-middle debugging library"; + propagatedBuildInputs = [ + async + core + ppx_jane + angstrom + angstrom-async + ]; + }; + + n_ary = janePackage { + pname = "n_ary"; + hash = "sha256-xg4xK3m7SoO1P+rBHvPqFMLx9JXnADEeyU58UmAqW6s="; + meta.description = "A library for N-ary datatypes and operations"; + propagatedBuildInputs = [ + base + expect_test_helpers_core + ppx_compare + ppx_enumerate + ppx_hash + ppx_jane + ppx_sexp_conv + ppx_sexp_message + ]; + }; + + numeric_string = janePackage { + pname = "numeric_string"; + hash = "sha256-cU5ETGfavkkiqZOjehCYg06YdDk8W+ZDqz17FGWHey8="; + meta.description = "A comparison function for strings that sorts numeric fragments of strings according to their numeric value"; + propagatedBuildInputs = [ + base + ppx_jane + ]; + }; + + ocaml-compiler-libs = janePackage ( + { + pname = "ocaml-compiler-libs"; + minimalOCamlVersion = "4.04.1"; + meta.description = "OCaml compiler libraries repackaged"; + } + // ( + if lib.versionAtLeast ocaml.version "5.2" then + { + version = "0.17.0"; + hash = "sha256-QaC6BWrpFblra6X1+TrlK+J3vZxLvLJZ2b0427DiQzM="; + } + else + { + version = "0.12.4"; + hash = "sha256-W+KUguz55yYAriHRMcQy8gRPzh2TZSJnexG1JI8TLgI="; + } + ) + ); + + ocaml-embed-file = janePackage { + pname = "ocaml-embed-file"; + hash = "sha256-7fyZ5DNcRHud0rd4dLUv9Vyf3lMwMVxgkl9jVUn1/lw="; + propagatedBuildInputs = [ + async + ppx_jane + ]; + meta.description = "Files contents as module constants"; + }; + + ocaml_intrinsics_kernel = janePackage { + pname = "ocaml_intrinsics_kernel"; + hash = "sha256-utD9HE0P3vPgSXDW8Bz0FxgEy+lNkIAlN/+JkfDqb9A="; + meta.description = "A kernel library of intrinsics for OCaml"; + buildInputs = [ dune-configurator ]; + }; + + ocaml_intrinsics = janePackage { + pname = "ocaml_intrinsics"; + hash = "sha256-Ndt6ZPJamBYzr1YA941BLwvRgkkbD8AEQR/JjjR38xI="; + meta.description = "A library of intrinsics for OCaml"; + buildInputs = [ + dune-configurator + ocaml_intrinsics_kernel + ]; + }; + + ocaml_openapi_generator = janePackage { + pname = "ocaml_openapi_generator"; + hash = "sha256-HCq9fylcVjBMs8L6E860nw+EonWEQadlyEKpQI6mynU="; + meta.description = " An OpenAPI 3 to OCaml client generator"; + buildInputs = [ + async + core + core_kernel + core_unix + jsonaf + ppx_jane + ppx_jsonaf_conv + httpaf + jingoo + uri + ]; + nativeBuildInputs = [ ocaml-embed-file ]; + }; + + of_json = janePackage { + pname = "of_json"; + hash = "sha256-pZCiwXRwZK6ohsGz/WLacgo48ekdT35uD4VESvGxH8A="; + meta.description = "A friendly applicative interface for Jsonaf"; + buildInputs = [ + core + core_extended + jsonaf + ppx_jane + ]; + }; + + ordinal_abbreviation = janePackage { + pname = "ordinal_abbreviation"; + hash = "sha256-kmTGnGbhdiUoXXw2DEAeZJL2sudEf8BRRt2RHCdL7HU="; + meta.description = "A minimal library for generating ordinal names of integers"; + buildInputs = [ + base + ppx_jane + ]; + }; + + parsexp = janePackage { + pname = "parsexp"; + hash = "sha256-iKrZ6XDLM6eRl7obaniDKK6X8R7Kxry6HD7OQBwh3NU="; + meta.description = "S-expression parsing library"; + propagatedBuildInputs = [ + base + sexplib0 + ]; + }; + + patdiff = janePackage { + pname = "patdiff"; + hash = "sha256-iphpQ0b8i+ItY57zM4xL9cID9GYuTCMZN7SYa7TDprI="; + + # Used by patdiff-git-wrapper. Providing it here also causes the shebang + # line to be automatically patched. + buildInputs = [ bash ]; + propagatedBuildInputs = [ + core_unix + patience_diff + ocaml_pcre + ]; + meta = { + description = "File Diff using the Patience Diff algorithm"; + }; + postPatch = '' + patchShebangs test/bin/setup.sh + ''; + doCheck = false; # test rules broken + }; + + patience_diff = janePackage { + pname = "patience_diff"; + hash = "sha256-sn/8SvMt7kzzuYUwhB/uH/3mO1aIKHw/oRYRzA7goFU="; + meta.description = "Diff library using Bram Cohen's patience diff algorithm"; + propagatedBuildInputs = [ core_kernel ]; + }; + + polling_state_rpc = janePackage { + pname = "polling_state_rpc"; + hash = "sha256-fZKGva11ztuM+q0Lc6rr9NEH/Qo+wFmE6Rr1/TJm7rA="; + meta.description = "An RPC which tracks state on the client and server so it only needs to send diffs across the wire"; + propagatedBuildInputs = [ + async_kernel + async_rpc_kernel + babel + core + core_kernel + legacy_diffable + ppx_jane + ]; + }; + + posixat = janePackage { + pname = "posixat"; + hash = "sha256-G+5q8x1jfG3wEwNzX2tkcC2Pm4E5/ZYxQyBwCUNXIrw="; + propagatedBuildInputs = [ + ppx_optcomp + ppx_sexp_conv + ]; + meta.description = "Binding to the posix *at functions"; + }; + + ppx_accessor = janePackage { + pname = "ppx_accessor"; + hash = "sha256-vK6lA0J98bDGtVthIdU76ckzH+rpNUD1cQ3vMzHy0Iw="; + meta.description = "[@@deriving] plugin to generate accessors for use with the Accessor libraries"; + propagatedBuildInputs = [ accessor ]; + }; + + ppx_assert = janePackage { + pname = "ppx_assert"; + hash = "sha256-o9ywdFH6+qoJ3eWb29/gGlkWkHDMuBx626mNxrT1D8A="; + meta.description = "Assert-like extension nodes that raise useful errors on failure"; + propagatedBuildInputs = [ + ppx_cold + ppx_compare + ppx_here + ppx_sexp_conv + ]; + }; + + ppx_base = janePackage { + pname = "ppx_base"; + hash = "sha256-/s7c8vfLIO1pPajNldMgurBKXsSzQ8yxqFI6QZCHm5I="; + meta.description = "Base set of ppx rewriters"; + propagatedBuildInputs = [ + ppx_cold + ppx_enumerate + ppx_globalize + ppx_hash + ]; + }; + + ppx_bench = janePackage { + pname = "ppx_bench"; + hash = "sha256-y4nL/wwjJUL2Fa7Ne0f7SR5flCjT1ra9M1uBHOUZWCg="; + meta.description = "Syntax extension for writing in-line benchmarks in ocaml code"; + propagatedBuildInputs = [ ppx_inline_test ]; + }; + + ppx_bin_prot = janePackage { + pname = "ppx_bin_prot"; + hash = "sha256-nQps/+Csx3+6H6KBzIm/dLCGWJ9fcRD7JxB4P2lky0o="; + meta.description = "Generation of bin_prot readers and writers from types"; + propagatedBuildInputs = [ + bin_prot + ppx_here + ]; + doCheck = false; # circular dependency with ppx_jane + }; + + ppx_cold = janePackage { + pname = "ppx_cold"; + hash = "sha256-fFZqlcbUS7D+GjnxSjGYckkQtx6ZcPNtOIsr6Rt6D9A="; + meta.description = "Expands [@cold] into [@inline never][@specialise never][@local never]"; + propagatedBuildInputs = [ ppxlib ]; + }; + + ppx_compare = janePackage { + pname = "ppx_compare"; + hash = "sha256-uAXB9cba0IBl+cA2CAuGVVxuos4HXH5jlB6Qjxx44Y0="; + meta.description = "Generation of comparison functions from types"; + propagatedBuildInputs = [ + ppxlib + ppxlib_jane + base + ]; + }; + + ppx_conv_func = janePackage { + pname = "ppx_conv_func"; + hash = "sha256-PJ8T0u8VkxefaxojwrmbMXDjqyfAIxKe92B8QqRY2JU="; + meta.description = "Part of the Jane Street's PPX rewriters collection"; + propagatedBuildInputs = [ + ppxlib + base + ]; + }; + + ppx_custom_printf = janePackage { + pname = "ppx_custom_printf"; + hash = "sha256-DFgDb9MIFCqglYoMgPUN0zEaxkr7VJAXgLxq1yp8ap4="; + meta.description = "Printf-style format-strings for user-defined string conversion"; + propagatedBuildInputs = [ ppx_sexp_conv ]; + }; + + ppx_css = janePackage { + pname = "ppx_css"; + hash = "sha256-mzLMVtNTy9NrVaNgsRa+oQynxXnh2qlHJCfr3FLFJ2I="; + meta.description = "A ppx that takes in css strings and produces a module for accessing the unique names defined within"; + propagatedBuildInputs = [ + async + async_unix + core_kernel + core_unix + ppxlib + js_of_ocaml + js_of_ocaml-ppx + sedlex + virtual_dom + ]; + }; + + ppx_csv_conv = janePackage { + pname = "ppx_csv_conv"; + hash = "sha256-NtqfagLIYiuyBjEAxilAhATx8acJwD7LykHBzfr+yAc="; + meta.description = "Generate functions to read/write records in csv format"; + propagatedBuildInputs = [ + csvfields + ppx_conv_func + ]; + }; + + ppx_demo = janePackage { + pname = "ppx_demo"; + hash = "sha256-blD96GhicOj3b6jYNniSpq6fBR+ul9Y2kn0ZmfbeVMo="; + meta.description = "PPX that exposes the source code string of an expression/module structure"; + propagatedBuildInputs = [ + core + dedent + ppx_jane + ppxlib + ]; + }; + + ppx_derive_at_runtime = janePackage { + pname = "ppx_derive_at_runtime"; + hash = "sha256-Y/z4BKFRt3z1lUGdc7SznIv/ys//dZHoPSnsouj1GtI="; + meta.description = "Define a new ppx deriver by naming a runtime module"; + propagatedBuildInputs = [ + base + expect_test_helpers_core + ppx_jane + ppxlib + ]; + }; + + ppx_diff = janePackage { + pname = "ppx_diff"; + hash = "sha256-MAn+vcU6vLR8g16Wq1sORyLcLgWxLsazMQY1syY6HsA="; + meta.description = "Generation of diffs and update functions for ocaml types"; + propagatedBuildInputs = [ + base + gel + ppx_compare + ppx_enumerate + ppx_jane + ]; + }; + + ppx_disable_unused_warnings = janePackage { + pname = "ppx_disable_unused_warnings"; + hash = "sha256-KHWIufXU+k6xCLf8l50Pp/1JZ2wFrKnKT/aQYpadlmU="; + meta.description = ''Expands [@disable_unused_warnings] into [@warning "-20-26-32-33-34-35-36-37-38-39-60-66-67"]''; + propagatedBuildInputs = [ ppxlib ]; + }; + + ppx_embed_file = janePackage { + pname = "ppx_embed_file"; + hash = "sha256-Ew6/X7oAq81ldERU37QWXQdgReEtPD/lxbku8WZNJ6A="; + meta.description = "A PPX that allows embedding files directly into executables/libraries as strings or bytes"; + propagatedBuildInputs = [ + core + ppx_jane + shell + ppxlib + ]; + }; + + ppx_enumerate = janePackage { + pname = "ppx_enumerate"; + hash = "sha256-YqBrxp2fe91k8L3aQVW6egoDPj8onGSRueQkE2Icdu4="; + meta.description = "Generate a list containing all values of a finite type"; + propagatedBuildInputs = [ + ppxlib + ppxlib_jane + ]; + }; + + ppx_expect = janePackage { + pname = "ppx_expect"; + hash = "sha256-m4Nr48ZET632I6vw5RjpNA0elW3lpN3aPmfA3RzsEn8="; + meta.description = "Cram like framework for OCaml"; + propagatedBuildInputs = [ + ppx_here + ppx_inline_test + re + ]; + doCheck = false; # test build rules broken + }; + + ppx_fields_conv = janePackage { + pname = "ppx_fields_conv"; + hash = "sha256-FA7hDgqJMJ2obsVwzwaGnNLPvjP0SkTec8Nh3znuNDQ="; + meta.description = "Generation of accessor and iteration functions for ocaml records"; + propagatedBuildInputs = [ + fieldslib + ppxlib + ]; + }; + + ppx_fixed_literal = janePackage { + pname = "ppx_fixed_literal"; + hash = "sha256-Xq+btvZQ/+6bcHoH9DcrrhD5CkwpFeedn7YEFHeLzsU="; + meta.description = "Simpler notation for fixed point literals"; + propagatedBuildInputs = [ ppxlib ]; + }; + + ppx_globalize = janePackage { + pname = "ppx_globalize"; + hash = "sha256-LKV5zfaf6AXn3NzOhN2ka8NtjItPTIsfmoJVBw5bYi8="; + meta.description = "A ppx rewriter that generates functions to copy local values to the global heap"; + propagatedBuildInputs = [ + base + ppxlib + ppxlib_jane + ]; + }; + + ppx_hash = janePackage { + pname = "ppx_hash"; + hash = "sha256-GADCLoF2GjZkvAiezn0xyReCs1avrUgjJGSS/pMNq38="; + meta.description = "A ppx rewriter that generates hash functions from type expressions and definitions"; + propagatedBuildInputs = [ + ppx_compare + ppx_sexp_conv + ]; + }; + + ppx_here = janePackage { + pname = "ppx_here"; + hash = "sha256-ybwOcv82uDRPTlfaQgaBJHVq6xBxIRUj07CXP131JsM="; + meta.description = "Expands [%here] into its location"; + propagatedBuildInputs = [ ppxlib ]; + doCheck = false; # test build rules broken + }; + + ppx_ignore_instrumentation = janePackage { + pname = "ppx_ignore_instrumentation"; + hash = "sha256-73dp8XKfsLO0Z6A1p5/K7FjxgeUPMBkScx0IjfbOV+w="; + meta.description = "Ignore Jane Street specific instrumentation extensions"; + propagatedBuildInputs = [ ppxlib ]; + }; + + ppx_inline_test = janePackage { + pname = "ppx_inline_test"; + hash = "sha256-pNdrmAlT3MUbuPUcMmCRcUIXv4fZ/o/IofJmnUKf8Cs="; + meta.description = "Syntax extension for writing in-line tests in ocaml code"; + propagatedBuildInputs = [ + ppxlib + time_now + ]; + doCheck = false; # test build rules broken + }; + + ppx_jane = janePackage { + pname = "ppx_jane"; + hash = "sha256-HgIob7iJkV0HcGi6IjjSUWdKOAu2TsC3GMyzpjYS1cs="; + meta.description = "Standard Jane Street ppx rewriters"; + propagatedBuildInputs = [ + base_quickcheck + ppx_bin_prot + ppx_disable_unused_warnings + ppx_expect + ppx_fixed_literal + ppx_ignore_instrumentation + ppx_log + ppx_module_timer + ppx_optcomp + ppx_optional + ppx_pipebang + ppx_stable + ppx_string + ppx_string_conv + ppx_tydi + ppx_typerep_conv + ppx_variants_conv + ]; + }; + + ppx_jsonaf_conv = janePackage { + pname = "ppx_jsonaf_conv"; + hash = "sha256-v7CYOJ1g4LkqIv5De5tQjjkBWXqKHbvqfSr0X5jBUuM="; + meta.description = "[@@deriving] plugin to generate Jsonaf conversion functions"; + propagatedBuildInputs = [ + base + jsonaf + ppx_jane + ppxlib + ]; + }; + + ppx_js_style = janePackage { + pname = "ppx_js_style"; + hash = "sha256-7jRzxe4bLyZ2vnHeqWiLlCUvOlNUAk0dwCfBFhrykUU="; + meta.description = "Code style checker for Jane Street Packages"; + propagatedBuildInputs = [ + octavius + ppxlib + ]; + }; + + ppx_let = janePackage { + pname = "ppx_let"; + hash = "sha256-JkNQgbPHVDH659m4Xy9ipcZ/iqGtj5q1qQn1P+O7TUY="; + meta.description = "Monadic let-bindings"; + propagatedBuildInputs = [ + ppxlib + ppx_here + ]; + }; + + ppx_log = janePackage { + pname = "ppx_log"; + hash = "sha256-llnjWeJH4eg5WtegILRxdwO3RWGWTFeCIKr6EbrUDI4="; + meta.description = "Ppx_sexp_message-like extension nodes for lazily rendering log messages"; + propagatedBuildInputs = [ + base + ppx_compare + ppx_enumerate + ppx_expect + ppx_fields_conv + ppx_here + ppx_let + ppx_sexp_conv + ppx_sexp_message + ppx_sexp_value + ppx_string + ppx_variants_conv + sexplib + ]; + doCheck = false; # test build rules broken + }; + + ppx_module_timer = janePackage { + pname = "ppx_module_timer"; + hash = "sha256-OWo1Ij9JAxsk9HlTlaz9Qw2+4YCvXDmIvytAOgFCLPI="; + meta.description = "Ppx rewriter that records top-level module startup times"; + propagatedBuildInputs = [ time_now ]; + }; + + ppx_optcomp = janePackage { + pname = "ppx_optcomp"; + hash = "sha256-H9oTzhJx9IGRkcwY2YEvcvNgeJ8ETNO95qKcjTXJBwk="; + meta.description = "Optional compilation for OCaml"; + propagatedBuildInputs = [ ppxlib ]; + }; + + ppx_optional = janePackage { + pname = "ppx_optional"; + hash = "sha256-SHw2zh6lG1N9zWF2b3VWeYzRHUx4jUxyOYgHd2/N9wE="; + meta.description = "Pattern matching on flat options"; + propagatedBuildInputs = [ + ppxlib + ppxlib_jane + ]; + }; + + ppx_pattern_bind = janePackage { + pname = "ppx_pattern_bind"; + hash = "sha256-IVDvFU9ERB2YFJOgP/glYcO4KhEH5VdQ7wCCfreboqA="; + meta.description = "A ppx for writing fast incremental bind nodes in a pattern match"; + propagatedBuildInputs = [ ppx_let ]; + }; + + ppx_pipebang = janePackage { + pname = "ppx_pipebang"; + hash = "sha256-GBa1zzNChZOQfVSHyUeDEMFxuNUT3lj/pIQi/l1J35M="; + meta.description = "A ppx rewriter that inlines reverse application operators `|>` and `|!`"; + propagatedBuildInputs = [ ppxlib ]; + }; + + ppx_python = janePackage { + pname = "ppx_python"; + hash = "sha256-WqTYH5Zz/vRak/CL1ha8oUbQ8+XRuUu9610uj8II74o="; + meta.description = "A [@@deriving] plugin to generate Python conversion functions "; + propagatedBuildInputs = [ + ppx_base + ppxlib + pyml + ]; + doCheck = false; # test rules broken + }; + + ppx_quick_test = janePackage { + pname = "ppx_quick_test"; + hash = "sha256-Kxb0IJcosC4eYlUjEfZE9FhY8o1/gDHHLWD5Cby5hXY="; + meta.description = "Spiritual equivalent of let%expect_test, but for property based tests"; + propagatedBuildInputs = [ + async + async_kernel + base + base_quickcheck + core + core_kernel + expect_test_helpers_core + ppx_expect + ppx_here + ppx_jane + ppx_sexp_conv + ppx_sexp_message + ]; + }; + + ppx_sexp_conv = janePackage { + pname = "ppx_sexp_conv"; + hash = "sha256-hUi0I50SODK1MpL86xy8eM8yn8f4q1Hv4LP9zFnnr70="; + meta.description = "[@@deriving] plugin to generate S-expression conversion functions"; + propagatedBuildInputs = [ + ppxlib + ppxlib_jane + sexplib0 + base + ]; + }; + + ppx_sexp_message = janePackage { + pname = "ppx_sexp_message"; + hash = "sha256-SNgTvsTUgFzjqHpyIYk4YuA4c5MbA9e77YUEsDaKTeA="; + meta.description = "A ppx rewriter for easy construction of s-expressions"; + propagatedBuildInputs = [ + ppx_here + ppx_sexp_conv + ]; + }; + + ppx_sexp_value = janePackage { + pname = "ppx_sexp_value"; + hash = "sha256-f96DLNFI+s3TKsOj01i6xUoM9L+qRgAXbbepNis397I="; + meta.description = "A ppx rewriter that simplifies building s-expressions from ocaml values"; + propagatedBuildInputs = [ + ppx_here + ppx_sexp_conv + ]; + }; + + ppx_stable = janePackage { + pname = "ppx_stable"; + hash = "sha256-N5oPjjQcLgiO9liX8Z0vg0IbQXaGZ4BqOgwvuIKSKaA="; + meta.description = "Stable types conversions generator"; + propagatedBuildInputs = [ ppxlib ]; + }; + + ppx_stable_witness = janePackage { + pname = "ppx_stable_witness"; + hash = "sha256-k45uR/OMPRsi5450CuUo592EVc82DPhO8TvBPjgJTh0="; + meta.description = "Ppx extension for deriving a witness that a type is intended to be stable"; + propagatedBuildInputs = [ + base + ppxlib + ]; + }; + + ppx_string = janePackage { + pname = "ppx_string"; + hash = "sha256-taAvJas9DvR5CIiFf38IMdNqLJ0QJmnIdcNJAaVILgA="; + meta.description = "Ppx extension for string interpolation"; + propagatedBuildInputs = [ + ppx_base + ppxlib + stdio + ]; + }; + + ppx_string_conv = janePackage { + pname = "ppx_string_conv"; + hash = "sha256-r+XubSXjxVyCsra99D6keJ/lmXeK5SZbI6h/IFghvPQ="; + meta.description = "Ppx to help derive of_string and to_string, primarily for variant types"; + propagatedBuildInputs = [ + capitalization + ppx_let + ppx_string + ]; + }; + + ppx_tydi = janePackage { + pname = "ppx_tydi"; + hash = "sha256-PM89fP6Rb6M99HgEzQ7LfpW1W5adw6J/E1LFQJtdd0U="; + meta.description = "Let expressions, inferring pattern type from expression"; + propagatedBuildInputs = [ + base + ppxlib + ]; + }; + + ppx_typed_fields = janePackage { + pname = "ppx_typed_fields"; + hash = "sha256-aTPEBBc1zniZkEmzubGkU064bwGnefBOjVDqTdPm2w8="; + meta.description = "GADT-based field accessors and utilities"; + propagatedBuildInputs = [ + core + ppx_jane + ppxlib + ]; + }; + + ppx_typerep_conv = janePackage { + pname = "ppx_typerep_conv"; + hash = "sha256-V9yOSy3cj5/bz9PvpO3J+aeFu1G+qGQ8AR3gSczUZbY="; + meta.description = "Generation of runtime types from type declarations"; + propagatedBuildInputs = [ + ppxlib + typerep + ]; + }; + + ppx_variants_conv = janePackage { + pname = "ppx_variants_conv"; + hash = "sha256-Av2F699LzVCpwcdji6qG0jt5DVxCnIY4eBLaPK1JC10="; + meta.description = "Generation of accessor and iteration functions for ocaml variant types"; + propagatedBuildInputs = [ + variantslib + ppxlib + ]; + }; + + ppxlib_jane = janePackage { + pname = "ppxlib_jane"; + hash = "sha256-8NC8CHh3pSdFuRDQCuuhc2xxU+84UAsGFJbbJoKwd0U="; + meta.description = "A library for use in ppxes for constructing and matching on ASTs corresponding to the augmented parsetree"; + propagatedBuildInputs = [ ppxlib ]; + }; + + profunctor = janePackage { + pname = "profunctor"; + hash = "sha256-WYPJLt3kYvIzh88XcPpw2xvSNjNX63/LvWwIDK+Xr0Q="; + meta.description = "A library providing a signature for simple profunctors and traversal of a record"; + propagatedBuildInputs = [ + base + ppx_jane + record_builder + ]; + }; + + protocol_version_header = janePackage { + pname = "protocol_version_header"; + hash = "sha256-WKy4vahmmj6o82/FbzvFYfJFglgNMrka0XhtCMUyct4="; + meta.description = "Protocol versioning"; + propagatedBuildInputs = [ core_kernel ]; + }; + + re2 = janePackage { + pname = "re2"; + hash = "sha256-0VCSOzrVouMRVZJumcqv0F+HQFXlFfVEFIhYq7Tfhrg="; + meta.description = "OCaml bindings for RE2, Google's regular expression library"; + propagatedBuildInputs = [ + core_kernel + jane_rope + regex_parser_intf + ]; + prePatch = '' + substituteInPlace src/re2_c/dune --replace 'CXX=g++' 'CXX=c++' + substituteInPlace src/dune --replace '(cxx_flags (:standard \ -pedantic) (-I re2_c/libre2))' '(cxx_flags (:standard \ -pedantic) (-I re2_c/libre2) (-x c++))' + ''; + }; + + re2_stable = janePackage { + pname = "re2_stable"; + version = "0.14.0"; + hash = "sha256-gyet2Pzn7ZIqQ+UP2J51pRmwaESY2LSGTqCMZZwDTE4="; + meta.description = "Re2_stable adds an incomplete but stable serialization of Re2"; + propagatedBuildInputs = [ + core + re2 + ]; + }; + + record_builder = janePackage { + pname = "record_builder"; + hash = "sha256-NQ0Wizxi/wD8BCwt8hxZWnEpLBTn3XkaG+96ooOKIFE="; + meta.description = "A library which provides traversal of records with an applicative"; + propagatedBuildInputs = [ + base + ppx_jane + ]; + }; + + redis-async = janePackage { + pname = "redis-async"; + hash = "sha256-bwKPEnK2uJq5H65BDAL1Vk3qSr5kUwaCEiFsgaCdHw8="; + meta.description = "Redis client for Async applications"; + propagatedBuildInputs = [ + async + bignum + core + core_kernel + ppx_jane + ]; + }; + + regex_parser_intf = janePackage { + pname = "regex_parser_intf"; + hash = "sha256-j6zWJf5c5qWphMqb9JpEAMGDDsrzV+NU2zrGmZHSAgk="; + meta.description = "Interface shared by Re_parser and Re2.Parser"; + propagatedBuildInputs = [ base ]; + }; + + resource_cache = janePackage { + pname = "resource_cache"; + hash = "sha256-1WEjvdnl47rjCCMvGxqDKAb2ny6pJDlvDfZhKp+40Jg="; + meta.description = "General resource cache"; + propagatedBuildInputs = [ async_rpc_kernel ]; + }; + + semantic_version = janePackage { + pname = "semantic_version"; + hash = "sha256-2Z2C+1bfI6W7Pw7SRYw8EkaVVwQkkm+knCrJIfsJhPE="; + meta.description = "Semantic versioning"; + propagatedBuildInputs = [ + core + ppx_jane + re + ]; + }; + + sexp = janePackage { + pname = "sexp"; + hash = "sha256-89SNb0MeJbetRRbA5qbBQPXIcLQ0QCeSf8p9v5yUTP0="; + propagatedBuildInputs = [ + async + core + csvfields + jsonaf + re2 + sexp_diff + sexp_macro + sexp_pretty + sexp_select + shell + ]; + meta.description = "S-expression swiss knife"; + }; + + sexp_grammar = janePackage { + pname = "sexp_grammar"; + hash = "sha256-yagp8bEZvc4joV81w56hAb17mUbnekuzECVcwLIvYoE="; + propagatedBuildInputs = [ + core + ppx_bin_prot + ppx_compare + ppx_hash + ppx_let + ppx_sexp_conv + ppx_sexp_message + zarith + ]; + meta.description = "Helpers for manipulating [Sexplib.Sexp_grammar] values"; + }; + + sexp_diff = janePackage { + pname = "sexp_diff"; + hash = "sha256-0p1+jMa2b/GJu+JtN+XUuR04lFQchxMeu9ikfgErqMU="; + propagatedBuildInputs = [ core_kernel ]; + meta.description = "Code for computing the diff of two sexps"; + }; + + sexp_macro = janePackage { + pname = "sexp_macro"; + hash = "sha256-KXJ+6uR38ywkr8uT8n2bWk10W7vW2ntMgxgF4ZvzzWU="; + propagatedBuildInputs = [ + async + sexplib + ]; + meta.description = "Sexp macros"; + }; + + sexp_pretty = janePackage { + pname = "sexp_pretty"; + hash = "sha256-DcgLlwp3AMC1QzFYPzi7aHA+VhnhbG6p/fLDTMx8ATc="; + meta.description = "S-expression pretty-printer"; + propagatedBuildInputs = [ + ppx_base + re + sexplib + ]; + }; + + sexp_select = janePackage { + pname = "sexp_select"; + hash = "sha256-3AUFRtNe32TEB7lItcu7XlEv+3k+4QTitcTnT0kg28Y="; + propagatedBuildInputs = [ + base + core_kernel + ppx_jane + ]; + meta.description = "A library to use CSS-style selectors to traverse sexp trees"; + }; + + sexplib0 = janePackage { + pname = "sexplib0"; + hash = "sha256-Q53wEhRet/Ou9Kr0TZNTyXT5ASQpsVLPz5n/I+Fhy+g="; + minimalOCamlVersion = "4.14.0"; + meta.description = "Library containing the definition of S-expressions and some base converters"; + }; + + sexplib = janePackage { + pname = "sexplib"; + hash = "sha256-DxTMAQbskZ87pMVQnxYc3opGGCzmUKGCZfszr/Z9TGA="; + meta.description = "Library for serializing OCaml values to and from S-expressions"; + propagatedBuildInputs = [ + num + parsexp + ]; + }; + + shell = janePackage { + pname = "shell"; + hash = "sha256-MJerTFLGrUaR3y3mnKVrH5EQHYBXZyuVL+n2wJZ9HoU="; + meta.description = "Yet another implementation of fork&exec and related functionality"; + buildInputs = [ jst-config ]; + propagatedBuildInputs = [ textutils ]; + checkInputs = [ ounit ]; + }; + + shexp = janePackage { + pname = "shexp"; + hash = "sha256-tf9HqZ01gMWxfcpe3Pl3rdPTPgIEdb59iwzwThznqAc="; + propagatedBuildInputs = [ + posixat + spawn + ]; + meta.description = "Process library and s-expression based shell"; + }; + + spawn = janePackage { + pname = "spawn"; + minimalOCamlVersion = "4.05"; + version = "0.15.1"; + hash = "sha256-6vAkRjTZQGiPhYBWX4MBO3GxEDmAE+18vpMWXMcvWJk="; + meta.description = "Spawning sub-processes"; + buildInputs = [ ppx_expect ]; + }; + + splay_tree = janePackage { + pname = "splay_tree"; + hash = "sha256-gRHRqUKjFEgkL1h8zSbqJkf+gHxhh61AtAT+mkPcz+k="; + meta.description = "A splay tree implementation"; + propagatedBuildInputs = [ core_kernel ]; + }; + + splittable_random = janePackage { + pname = "splittable_random"; + hash = "sha256-LlaCxL17GBZc33spn/JnunpaMQ47n+RXS8CShBlaRWA="; + meta.description = "PRNG that can be split into independent streams"; + propagatedBuildInputs = [ + base + ppx_assert + ppx_bench + ppx_sexp_message + ]; + }; + + stdio = janePackage { + pname = "stdio"; + hash = "sha256-N4VMUq6zWdYiJarVECSadxnoXJKh6AsIIaChmHFSbdA="; + meta.description = "Standard IO library for OCaml"; + propagatedBuildInputs = [ base ]; + }; + + stored_reversed = janePackage { + pname = "stored_reversed"; + hash = "sha256-FPyQxXaGAzFWW6GiiqKQgU+6/lAZhEQwhNnXsmqKkzg="; + meta.description = "A library for representing a list temporarily stored in reverse order"; + propagatedBuildInputs = [ + core + ppx_jane + ]; + }; + + streamable = janePackage { + pname = "streamable"; + hash = "sha256-FtrAX4nsacCO5HTVxwLgwwT8R2sASJ05qu4gT2ZVSDg="; + meta.description = "A collection of types suitable for incremental serialization"; + propagatedBuildInputs = [ + async_kernel + async_rpc_kernel + base + core + core_kernel + ppx_jane + ppxlib + ]; + }; + + textutils = janePackage { + pname = "textutils"; + hash = "sha256-J58sqp9fkx3JyjnH6oJLCyEC0ZvnuDfqLVl+dt3tEgA="; + meta.description = "Text output utilities"; + propagatedBuildInputs = [ + core_unix + textutils_kernel + ]; + }; + + textutils_kernel = janePackage { + pname = "textutils_kernel"; + hash = "sha256-B5ExbKMRSw4RVJ908FVGob2soHFnJ6Ajsdn0q8lDhio="; + meta.description = "Text output utilities"; + propagatedBuildInputs = [ + core + ppx_jane + uutf + ]; + }; + + tilde_f = janePackage { + pname = "tilde_f"; + hash = "sha256-tuddvOmhk0fikB4dHNdXamBx6xfo4DCvivs44QXp5RQ="; + meta.description = "Provides a let-syntax for continuation-passing style"; + propagatedBuildInputs = [ + base + ppx_jane + ]; + }; + + time_now = janePackage { + pname = "time_now"; + hash = "sha256-bTPWE9+x+zmdLdzLc1naDlRErPZ8m4WXDJL2iLErdqk="; + meta.description = "Reports the current time"; + buildInputs = [ + jst-config + ppx_optcomp + ]; + propagatedBuildInputs = [ + jane-street-headers + base + ppx_base + ]; + }; + + timezone = janePackage { + pname = "timezone"; + hash = "sha256-/6OLWMrkyQSVTNJ24zRy6v4DObt9q99s75QRS/VVxXE="; + meta.description = "Time-zone handling"; + propagatedBuildInputs = [ core_kernel ]; + }; + + topological_sort = janePackage { + pname = "topological_sort"; + hash = "sha256-jLkJnh5lasrphI6BUKv7oVPrKyGqNm6VIGYthNs04iU="; + meta.description = "Topological sort algorithm"; + propagatedBuildInputs = [ + ppx_jane + stdio + ]; + }; + + typerep = janePackage { + pname = "typerep"; + hash = "sha256-0KwJdWtibgjxghFmOYKyPrcOAfoLpxYGBZm2KpH8tgA="; + meta.description = "Typerep is a library for runtime types"; + propagatedBuildInputs = [ base ]; + }; + + uopt = janePackage { + pname = "uopt"; + hash = "sha256-t0SFJVF0ScyFFwziBZOYCOsmhRd6J5H3s0Kk9NKorcM="; + meta.description = "An [option]-like type that incurs no allocation"; + propagatedBuildInputs = [ + base + ppx_jane + ]; + }; + + username_kernel = janePackage { + pname = "username_kernel"; + hash = "sha256-1lxWSv7CbmucurNw8ws18N9DYqo4ik2KZBc5GtNmmeU="; + meta.description = "An identifier for a user"; + propagatedBuildInputs = [ + core + ppx_jane + ]; + }; + + variantslib = janePackage { + pname = "variantslib"; + hash = "sha256-v/p718POQlFsB7N7WmMCDnmQDB2sP1263pSQIuvlLt8="; + meta.description = "Part of Jane Street's Core library"; + propagatedBuildInputs = [ base ]; + }; + + vcaml = janePackage { + pname = "vcaml"; + hash = "sha256-z3v0Uqb+jE19+EN/b6qQvAx+FaK5HmbdHnxEkYGSmS8="; + meta.description = "OCaml bindings for the Neovim API"; + propagatedBuildInputs = [ + angstrom-async + async_extra + base_trie + expect_test_helpers_async + faraday + jsonaf + man_in_the_middle_debugger + semantic_version + ]; + doCheck = false; # tests depend on nvim + }; + + versioned_polling_state_rpc = janePackage { + pname = "versioned_polling_state_rpc"; + hash = "sha256-Ba+Pevc/cvvY9FnQ2oTUxTekxypVkEy4MfrpRKmJhZ0="; + meta.description = "Helper functions for creating stable/versioned `Polling_state_rpc.t`s with babel"; + propagatedBuildInputs = [ + async_rpc_kernel + babel + core + polling_state_rpc + ppx_jane + ]; + }; + + virtual_dom = janePackage { + pname = "virtual_dom"; + hash = "sha256-5T+/N1fELa1cR9mhWLUgS3Fwr1OQXJ3J6T3YaHT9q7U="; + meta.description = "OCaml bindings for the virtual-dom library"; + buildInputs = [ js_of_ocaml-ppx ]; + propagatedBuildInputs = [ + base64 + core_kernel + gen_js_api + js_of_ocaml + js_of_ocaml_patches + lambdasoup + tyxml + uri + ]; + }; + + virtual_dom_toplayer = janePackage { + pname = "virtual_dom_toplayer"; + hash = "sha256-trTSWzWsXkV4RtQvVCyXqJN5/wftaFuooaehNekP9H0="; + meta.description = "OCaml bindings for the floating positioning library for 'toplevel' virtual dom components"; + propagatedBuildInputs = [ + core + js_of_ocaml_patches + ppx_css + ppx_jane + virtual_dom + gen_js_api + js_of_ocaml + js_of_ocaml-ppx + ]; + }; + + zarith_stubs_js = janePackage { + pname = "zarith_stubs_js"; + hash = "sha256-QNhs9rHZetwgKAOftgQQa6aU8cOux8JOe3dBRrLJVh0="; + meta.description = "Javascripts stubs for the Zarith library"; + propagatedBuildInputs = [ ppx_jane ]; + doCheck = false; # some test sources unavailable + }; + + zstandard = janePackage { + pname = "zstandard"; + hash = "sha256-EUI7fnN8ZaM1l0RBsgSAMWO+VXA8VoCv/lO5kcj+j4E="; + meta.description = "OCaml bindings to Zstandard"; + buildInputs = [ ppx_jane ]; + propagatedBuildInputs = [ + core_kernel + ctypes + zstd + ]; + }; +} diff --git a/pkgs/development/ocaml-modules/janestreet/janePackage_0_17.nix b/pkgs/development/ocaml-modules/janestreet/janePackage_0_17.nix new file mode 100644 index 000000000000..f366d6d1db8a --- /dev/null +++ b/pkgs/development/ocaml-modules/janestreet/janePackage_0_17.nix @@ -0,0 +1,39 @@ +{ + lib, + fetchFromGitHub, + buildDunePackage, + defaultVersion ? "0.17.0", +}: + +{ + pname, + version ? defaultVersion, + hash, + minimalOCamlVersion ? "5.1", + doCheck ? true, + buildInputs ? [ ], + ... +}@args: + +buildDunePackage ( + args + // { + inherit version buildInputs; + + inherit minimalOCamlVersion; + + src = fetchFromGitHub { + owner = "janestreet"; + repo = pname; + rev = "v${version}"; + sha256 = hash; + }; + + inherit doCheck; + + meta = { + license = lib.licenses.mit; + homepage = "https://github.com/janestreet/${pname}"; + } // args.meta; + } +) diff --git a/pkgs/development/ocaml-modules/janestreet/js_of_ocaml_patches.patch b/pkgs/development/ocaml-modules/janestreet/js_of_ocaml_patches.patch new file mode 100644 index 000000000000..c14ada4c676d --- /dev/null +++ b/pkgs/development/ocaml-modules/janestreet/js_of_ocaml_patches.patch @@ -0,0 +1,24 @@ +diff --git a/js_of_ocaml_patches.ml b/js_of_ocaml_patches.ml +index 58dd9d5..964b55e 100644 +--- a/js_of_ocaml_patches.ml ++++ b/js_of_ocaml_patches.ml +@@ -15,6 +15,6 @@ module Dom_html = struct + inherit Js_of_ocaml.Dom_html.canvasRenderingContext2D + + method ellipse : +- float -> float -> float -> float -> float -> float -> float -> unit meth ++ float -> float -> float -> float -> float -> float -> float -> bool t -> unit meth + end + end +diff --git a/js_of_ocaml_patches.mli b/js_of_ocaml_patches.mli +index 4aecc41..8ed5d50 100644 +--- a/js_of_ocaml_patches.mli ++++ b/js_of_ocaml_patches.mli +@@ -14,6 +14,6 @@ module Dom_html : sig + inherit Js_of_ocaml.Dom_html.canvasRenderingContext2D + + method ellipse : +- float -> float -> float -> float -> float -> float -> float -> unit meth ++ float -> float -> float -> float -> float -> float -> float -> bool t -> unit meth + end + end diff --git a/pkgs/development/ocaml-modules/ocamlformat/generic.nix b/pkgs/development/ocaml-modules/ocamlformat/generic.nix index f8f8c9d99195..d9dfd6dc1b1e 100644 --- a/pkgs/development/ocaml-modules/ocamlformat/generic.nix +++ b/pkgs/development/ocaml-modules/ocamlformat/generic.nix @@ -1,6 +1,7 @@ { lib, fetchurl, version ? "0.26.2", astring, base, camlp-streams, cmdliner_1_0 , cmdliner_1_1, csexp, dune-build-info, either, fix, fpath, menhirLib, menhirSdk -, ocaml-version, ocp-indent, odoc-parser, result, stdio, uuseg, uutf, ... }: +, ocaml-version, ocp-indent, odoc-parser, result, stdio, uuseg, uutf +, janeStreet_0_15, ... }: # The ocamlformat package have been split into two in version 0.25.1: # one for the library and one for the executable. @@ -42,8 +43,12 @@ rec { cmdliner_v = if lib.versionAtLeast version "0.21.0" then cmdliner_1_1 else cmdliner_1_0; - library_deps = [ - base + base_v = if lib.versionAtLeast version "0.25.1" then base else janeStreet_0_15.base; + + stdio_v =if lib.versionAtLeast version "0.25.1" then stdio else janeStreet_0_15.stdio; + + library_deps= [ + base_v cmdliner_v dune-build-info fix @@ -51,7 +56,7 @@ rec { menhirLib menhirSdk ocp-indent - stdio + stdio_v uuseg uutf ] ++ lib.optionals (lib.versionAtLeast version "0.20.0") [ diff --git a/pkgs/development/ocaml-modules/tdigest/default.nix b/pkgs/development/ocaml-modules/tdigest/default.nix index 88301c5ea715..b8d8f7b52017 100644 --- a/pkgs/development/ocaml-modules/tdigest/default.nix +++ b/pkgs/development/ocaml-modules/tdigest/default.nix @@ -17,6 +17,9 @@ buildDunePackage rec { minimalOCamlVersion = "4.14"; + # base v0.17 compatibility + patches = [ ./tdigest.patch ]; + propagatedBuildInputs = [ base ppx_sexp_conv diff --git a/pkgs/development/ocaml-modules/tdigest/tdigest.patch b/pkgs/development/ocaml-modules/tdigest/tdigest.patch new file mode 100644 index 000000000000..a4f0f76b8e1a --- /dev/null +++ b/pkgs/development/ocaml-modules/tdigest/tdigest.patch @@ -0,0 +1,17 @@ +diff --git a/src/cmap.ml b/src/cmap.ml +index 69f447b..3afb2b6 100644 +--- a/src/cmap.ml ++++ b/src/cmap.ml +@@ -173,6 +173,12 @@ end = struct + let of_list_with_key_multi list ~get_key = + Using_comparator.of_list_with_key_multi ~comparator list ~get_key + ++ let of_list_with_key_fold list ~get_key ~init ~f = ++ failwith "Map.of_list_with_key_fold: not implemented yet" ++ ++ let of_list_with_key_reduce list ~get_key ~f = ++ failwith "Map.of_list_with_key_reduce: not implemented yet" ++ + let of_alist alist = Using_comparator.of_alist ~comparator alist + + let of_alist_or_error alist = Using_comparator.of_alist_or_error ~comparator alist diff --git a/pkgs/tools/misc/flitter/flitter.patch b/pkgs/tools/misc/flitter/flitter.patch index f59b8a22eb67..04cd40dc74e5 100644 --- a/pkgs/tools/misc/flitter/flitter.patch +++ b/pkgs/tools/misc/flitter/flitter.patch @@ -1,5 +1,38 @@ +diff --git a/src/big.ml b/src/big.ml +index 7cd327f..f84bc10 100644 +--- a/src/big.ml ++++ b/src/big.ml +@@ -11,7 +11,7 @@ let big_font_map = + ] in + + let uchar_of_char = +- let open Caml.Uchar in ++ let open Stdlib.Uchar in + function + | '[' -> of_int 0x258C + | ']' -> of_int 0x2590 +@@ -48,4 +48,4 @@ let image_of_string attr str = + List.map (String.to_list str) ~f:(fun ch -> + List.map (Map.find_exn big_font_map ch) ~f:(I.uchars attr) + |> I.vcat +- ) |> I.hcat +\ No newline at end of file ++ ) |> I.hcat +diff --git a/src/display.ml b/src/display.ml +index bd6f7e4..44d7f6d 100644 +--- a/src/display.ml ++++ b/src/display.ml +@@ -41,7 +41,7 @@ let splits_header timer width = + let joined = I.hcat cell_padded in + let padded = left_pad width joined in + +- let br = I.uchar Colors.label (Caml.Uchar.of_int 0x2500) width 1 in ++ let br = I.uchar Colors.label (Stdlib.Uchar.of_int 0x2500) width 1 in + I.(padded <-> br) + + type time_status = Ahead_gain | Ahead_loss | Behind_gain | Behind_loss | Gold diff --git a/src/dune b/src/dune -index a50b09a..54cc770 100644 +index a50b09a..2b00ee2 100644 --- a/src/dune +++ b/src/dune @@ -1,7 +1,7 @@ diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index b8072a5ef5ce..a4124e665121 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -751,7 +751,9 @@ let # Jane Street janePackage = - if lib.versionOlder "4.13.1" ocaml.version + if lib.versionOlder "5.1" ocaml.version + then callPackage ../development/ocaml-modules/janestreet/janePackage_0_17.nix {} + else if lib.versionOlder "4.13.1" ocaml.version then callPackage ../development/ocaml-modules/janestreet/janePackage_0_16.nix {} else if lib.versionOlder "4.10.2" ocaml.version then callPackage ../development/ocaml-modules/janestreet/janePackage_0_15.nix {} @@ -762,7 +764,13 @@ let else null; janeStreet = - if lib.versionOlder "4.13.1" ocaml.version + if lib.versionOlder "5.1" ocaml.version + then import ../development/ocaml-modules/janestreet/0.17.nix + { + inherit self; + inherit (pkgs) bash fzf lib openssl zstd; + } + else if lib.versionOlder "4.13.1" ocaml.version then import ../development/ocaml-modules/janestreet/0.16.nix { inherit self; inherit (pkgs) bash fetchpatch fzf lib openssl zstd krb5;