diff --git a/pkgs/development/ocaml-modules/janestreet/0.12.nix b/pkgs/development/ocaml-modules/janestreet/0.12.nix index 295960764dc5..10d8886d9947 100644 --- a/pkgs/development/ocaml-modules/janestreet/0.12.nix +++ b/pkgs/development/ocaml-modules/janestreet/0.12.nix @@ -1,13 +1,10 @@ -{ janePackage -, ctypes -, num -, octavius -, ppxlib -, re +{ self , openssl }: -rec { +with self; + +{ ocaml-compiler-libs = janePackage { pname = "ocaml-compiler-libs"; diff --git a/pkgs/development/ocaml-modules/janestreet/0.14.nix b/pkgs/development/ocaml-modules/janestreet/0.14.nix index 738828e83086..eb429b2bb6dc 100644 --- a/pkgs/development/ocaml-modules/janestreet/0.14.nix +++ b/pkgs/development/ocaml-modules/janestreet/0.14.nix @@ -1,30 +1,11 @@ -{ janePackage -, alcotest -, angstrom -, angstrom-async -, base64 -, cryptokit -, ctypes -, dune-configurator -, faraday -, inotify -, js_of_ocaml -, js_of_ocaml-ppx -, lambdasoup -, magic-mime -, num -, octavius -, ppxlib -, re -, tyxml -, uri-sexp -, zarith +{ self , openssl -, ounit , zstd }: -rec { +with self; + +{ accessor = janePackage { pname = "accessor"; diff --git a/pkgs/development/ocaml-modules/janestreet/default.nix b/pkgs/development/ocaml-modules/janestreet/default.nix index a4c026ffb8b2..679ef4a58e48 100644 --- a/pkgs/development/ocaml-modules/janestreet/default.nix +++ b/pkgs/development/ocaml-modules/janestreet/default.nix @@ -1,10 +1,10 @@ -{ janePackage, ocamlbuild, angstrom, cryptokit, ctypes, - magic-mime, ocaml-migrate-parsetree, octavius, ounit, ppx_deriving, re, - num, openssl -, ppxlib +{ self +, openssl }: -rec { +with self; + +{ ocaml-compiler-libs = janePackage { pname = "ocaml-compiler-libs"; diff --git a/pkgs/development/ocaml-modules/janestreet/old.nix b/pkgs/development/ocaml-modules/janestreet/old.nix index 447a9cdf71f5..8b4a6ed52962 100644 --- a/pkgs/development/ocaml-modules/janestreet/old.nix +++ b/pkgs/development/ocaml-modules/janestreet/old.nix @@ -1,8 +1,32 @@ -{ stdenv, lib, janePackage, ocaml, ocamlbuild, cryptokit, ctypes, magic-mime, - ocaml-migrate-parsetree, octavius, ounit, ppx_deriving, re, zarith, num, - openssl }: +{ self +, super +, lib +, stdenv +, openssl +}: -rec { +let + inherit (super) + janePackage + ocaml + ocamlbuild + cryptokit + ctypes + magic-mime + ocaml-migrate-parsetree + octavius + ounit + ppx_deriving + re + zarith + num + ; + +in + +with self; + +{ # Jane Street packages, up to ppx_core diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 87d4d52d3884..790f9c465f9d 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -1255,32 +1255,31 @@ let janeStreet = if lib.versionOlder "4.08" ocaml.version then import ../development/ocaml-modules/janestreet/0.14.nix { - inherit alcotest angstrom angstrom-async base64 cryptokit ctypes - dune-configurator faraday inotify janePackage js_of_ocaml - js_of_ocaml-ppx lambdasoup magic-mime num octavius ounit - ppxlib re tyxml uri-sexp zarith; + inherit self; inherit (pkgs) openssl zstd; } else if lib.versionOlder "4.07" ocaml.version then import ../development/ocaml-modules/janestreet/0.12.nix { - inherit ctypes janePackage num octavius re; + self = self // { + ppxlib = ppxlib.override { version = "0.8.1"; }; + }; inherit (pkgs) openssl; - ppxlib = ppxlib.override { version = "0.8.1"; }; } else import ../development/ocaml-modules/janestreet { - inherit janePackage ocamlbuild angstrom ctypes cryptokit; - inherit magic-mime num ocaml-migrate-parsetree octavius ounit; - inherit ppx_deriving re; + self = self // { + ppxlib = ppxlib.override { version = "0.8.1"; }; + }; inherit (pkgs) openssl; - ppxlib = ppxlib.override { version = "0.8.1"; }; }; janeStreet_0_9_0 = import ../development/ocaml-modules/janestreet/old.nix { - janePackage = callPackage ../development/ocaml-modules/janestreet/janePackage.nix { defaultVersion = "0.9.0"; }; - inherit lib ocaml ocamlbuild ctypes cryptokit; - inherit magic-mime num ocaml-migrate-parsetree octavius ounit; - inherit ppx_deriving re zarith; - inherit (pkgs) stdenv openssl; + self = self.janeStreet_0_9_0; + super = self // { + janePackage = callPackage ../development/ocaml-modules/janestreet/janePackage.nix { + defaultVersion = "0.9.0"; + }; + }; + inherit (pkgs) stdenv lib openssl; }; js_build_tools = callPackage ../development/ocaml-modules/janestreet/js-build-tools.nix {};