From 1d0e6ba2df81ad5d9fa42c9181da945a8b1abae3 Mon Sep 17 00:00:00 2001 From: Matthew Maurer Date: Wed, 14 Sep 2016 16:34:33 -0400 Subject: [PATCH] async: 112.24.00 -> 112.24.00/113.33.03 PPX/P4 split --- .../ocaml-modules/async_find/default.nix | 4 ++-- .../ocaml-modules/async_shell/default.nix | 4 ++-- .../ocaml-modules/async_ssl/default.nix | 4 ++-- .../ocaml-modules/cstruct/default.nix | 6 +++--- .../ocaml-modules/janestreet/async.nix | 16 ++++++++++++++++ pkgs/top-level/all-packages.nix | 13 ++++++++++--- 6 files changed, 35 insertions(+), 12 deletions(-) create mode 100644 pkgs/development/ocaml-modules/janestreet/async.nix diff --git a/pkgs/development/ocaml-modules/async_find/default.nix b/pkgs/development/ocaml-modules/async_find/default.nix index 82b9f83317a0..d0e89940433c 100644 --- a/pkgs/development/ocaml-modules/async_find/default.nix +++ b/pkgs/development/ocaml-modules/async_find/default.nix @@ -1,4 +1,4 @@ -{stdenv, buildOcaml, fetchurl, async, core_p4, sexplib_p4}: +{stdenv, buildOcaml, fetchurl, async_p4, core_p4, sexplib_p4}: buildOcaml rec { name = "async_find"; @@ -11,7 +11,7 @@ buildOcaml rec { sha256 = "4e3fda72f50174f05d96a5a09323f236c041b1a685890c155822956f3deb8803"; }; - propagatedBuildInputs = [ async core_p4 sexplib_p4 ]; + propagatedBuildInputs = [ async_p4 core_p4 sexplib_p4 ]; meta = with stdenv.lib; { homepage = https://github.com/janestreet/async_find; diff --git a/pkgs/development/ocaml-modules/async_shell/default.nix b/pkgs/development/ocaml-modules/async_shell/default.nix index 92a3836ba90f..6b1e772bc7d1 100644 --- a/pkgs/development/ocaml-modules/async_shell/default.nix +++ b/pkgs/development/ocaml-modules/async_shell/default.nix @@ -1,4 +1,4 @@ -{stdenv, buildOcaml, fetchurl, async, core_p4, core_extended_p4}: +{stdenv, buildOcaml, fetchurl, async_p4, core_p4, core_extended_p4}: buildOcaml rec { name = "async_shell"; @@ -11,7 +11,7 @@ buildOcaml rec { sha256 = "0b4497bea9124c5a665ee58fb0a73c5cbf2f757479df902e6870627196e6c105"; }; - propagatedBuildInputs = [ async core_p4 core_extended_p4 ]; + propagatedBuildInputs = [ async_p4 core_p4 core_extended_p4 ]; meta = with stdenv.lib; { homepage = https://github.com/janestreet/async_shell; diff --git a/pkgs/development/ocaml-modules/async_ssl/default.nix b/pkgs/development/ocaml-modules/async_ssl/default.nix index 8e0286e725da..2bace35aa8b6 100644 --- a/pkgs/development/ocaml-modules/async_ssl/default.nix +++ b/pkgs/development/ocaml-modules/async_ssl/default.nix @@ -1,4 +1,4 @@ -{stdenv, buildOcaml, fetchurl, async, comparelib, core_p4, ctypes, openssl, +{stdenv, buildOcaml, fetchurl, async_p4, comparelib, core_p4, ctypes, openssl, fieldslib_p4, herelib, pa_bench, pa_ounit, pipebang, pa_test, sexplib_p4}: buildOcaml rec { @@ -13,7 +13,7 @@ buildOcaml rec { }; buildInputs = [ pa_bench pa_test ]; - propagatedBuildInputs = [ ctypes async comparelib core_p4 fieldslib_p4 pa_ounit + propagatedBuildInputs = [ ctypes async_p4 comparelib core_p4 fieldslib_p4 pa_ounit herelib pipebang sexplib_p4 openssl ]; meta = with stdenv.lib; { diff --git a/pkgs/development/ocaml-modules/cstruct/default.nix b/pkgs/development/ocaml-modules/cstruct/default.nix index 68b202f9ade6..c9f04918d172 100644 --- a/pkgs/development/ocaml-modules/cstruct/default.nix +++ b/pkgs/development/ocaml-modules/cstruct/default.nix @@ -1,5 +1,5 @@ {stdenv, writeText, fetchurl, ocaml, ocplib-endian, sexplib_p4, findlib, - async ? null, lwt ? null, camlp4}: + async_p4 ? null, lwt ? null, camlp4}: assert stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "4.01"; @@ -12,9 +12,9 @@ stdenv.mkDerivation { }; configureFlags = stdenv.lib.strings.concatStringsSep " " ((if lwt != null then ["--enable-lwt"] else []) ++ - (if async != null then ["--enable-async"] else [])); + (if async_p4 != null then ["--enable-async"] else [])); buildInputs = [ocaml findlib camlp4]; - propagatedBuildInputs = [ocplib-endian sexplib_p4 lwt async]; + propagatedBuildInputs = [ocplib-endian sexplib_p4 lwt async_p4]; createFindlibDestdir = true; dontStrip = true; diff --git a/pkgs/development/ocaml-modules/janestreet/async.nix b/pkgs/development/ocaml-modules/janestreet/async.nix new file mode 100644 index 000000000000..2e776e273be1 --- /dev/null +++ b/pkgs/development/ocaml-modules/janestreet/async.nix @@ -0,0 +1,16 @@ +{stdenv, buildOcamlJane, fetchurl, async_kernel, + async_unix, async_extra}: + +buildOcamlJane rec { + name = "async"; + version = "113.33.03"; + hash = "0wyspkp8k833fh03r3h016nbfn6kjfhvb2bg42cly6agcak59fmr"; + propagatedBuildInputs = [ async_kernel async_unix async_extra ]; + + meta = with stdenv.lib; { + homepage = https://github.com/janestreet/async; + description = "Jane Street Capital's asynchronous execution library"; + license = licenses.asl20; + maintainers = [ maintainers.maurer maintainers.ericbmerritt ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c003adbfe4b7..d65eaf847c94 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5072,7 +5072,7 @@ in async_unix_p4 = callPackage ../development/ocaml-modules/async_unix { }; - async = + async_p4 = if lib.versionOlder "4.02" ocaml_version then callPackage ../development/ocaml-modules/async { } else null; @@ -5626,6 +5626,11 @@ in if lib.versionOlder "4.02" ocaml_version then callPackage ../development/ocaml-modules/janestreet/async-extra.nix {} else async_extra_p4; + + async = + if lib.versionOlder "4.02" ocaml_version + then callPackage ../development/ocaml-modules/janestreet/async.nix {} + else async_p4; }; ocamlPackages = recurseIntoAttrs ocamlPackages_4_01_0; @@ -5753,9 +5758,11 @@ in tinycc = callPackage ../development/compilers/tinycc { }; trv = callPackage ../development/tools/misc/trv { - inherit (ocamlPackages_4_02) findlib camlp4 async - async_extra async_shell async_find cohttp uri; + inherit (ocamlPackages_4_02) findlib camlp4 + async_shell async_find cohttp uri; ocaml = ocaml_4_02; + async = ocamlPackages_4_02.async_p4; + async_extra = ocamlPackages_4_02.async_extra_p4; async_unix = ocamlPackages_4_02.async_unix_p4; core_extended = ocamlPackages_4_02.core_extended_p4; sexplib = ocamlPackages_4_02.sexplib_p4;