git.iko.soy/typeable/nixpkgs
on master help sign in
ocamlPackages.lwt: 2.7.1 -> 3.0.0
commitd3a29b393a45b63815d0e3374ec0cf9f54200ef9 authorVincent Laporte <Vincent.Laporte@gmail.com> dateSun 2 Jul 2017, 11:06 (9 years ago) parente8c0e8a
2 files changed+22−14
pkgs/development/ocaml-modules/lwt/default.nix+16−14 pkgs/top-level/ocaml-packages.nix+6
pkgs/development/ocaml-modules/lwt/default.nix+16−14
@@ -2,36 +2,38 @@
22, ocaml_react, ocaml_ssl, libev, pkgconfig, ncurses, ocaml_oasis, glib
33, ppx_tools, result, cppo
44, ppxSupport ? stdenv.lib.versionAtLeast ocaml.version "4.02"
5+, version ? if stdenv.lib.versionAtLeast ocaml.version "4.02" then "2.7.1" else "2.6.0"
56}:
67
7−let param =
8− if stdenv.lib.versionAtLeast ocaml.version "4.02"
9− then {
10− version = "2.7.1";
11− sha256 = "0w7f59havrl2fsnvs84lm7wlqpsrldg80gy5afpnpr21zkw22g8w";
12− } else {
13− version = "2.6.0";
14− sha256 = "0f1h83zh60rspm4fxd96z9h5bkhq1n1q968hgq92sq4a6bfi1c2w";
15− };
16−in
8+let sha256 = {
9+ "3.0.0" = "0wwhnl9hppixcsdisinj1wmffx0nv6hkpm01z9qvkngkrazi3i88";
10+ "2.7.1" = "0w7f59havrl2fsnvs84lm7wlqpsrldg80gy5afpnpr21zkw22g8w";
11+ "2.6.0" = "0f1h83zh60rspm4fxd96z9h5bkhq1n1q968hgq92sq4a6bfi1c2w";
12+}."${version}"; in
13+
14+let optionals = stdenv.lib.optionals (!stdenv.lib.versionAtLeast version "3"); in
1715
1816buildOcaml rec {
1917 name = "lwt";
20− inherit (param) version;
18+ inherit version;
2119
2220 src = fetchzip {
2321 url = "https://github.com/ocsigen/lwt/archive/${version}.tar.gz";
24− inherit (param) sha256;
22+ inherit sha256;
2523 };
2624
2725 buildInputs = [ ocaml_oasis pkgconfig which cryptopp ocaml findlib ocamlbuild glib ncurses camlp4 cppo ]
2826 ++ stdenv.lib.optional ppxSupport ppx_tools;
2927
30− propagatedBuildInputs = [ result ocaml_react ocaml_ssl libev ];
28+ propagatedBuildInputs = [ result ]
29+ ++ optionals [ ocaml_react ocaml_ssl ]
30+ ++ [ libev ];
3131
3232 configureScript = "ocaml setup.ml -configure";
3333 prefixKey = "--prefix ";
34− configureFlags = [ "--enable-glib" "--enable-ssl" "--enable-react" "--enable-camlp4" ]
34+ configureFlags =
35+ optionals [ "--enable-glib" "--enable-ssl" "--enable-react" ]
36+ ++ [ "--enable-camlp4" ]
3537 ++ [ (if ppxSupport then "--enable-ppx" else "--disable-ppx") ];
3638
3739 createFindlibDestdir = true;
pkgs/top-level/ocaml-packages.nix+6
@@ -302,6 +302,12 @@ let
302302 lwt = ocaml_lwt;
303303 };
304304
305+ lwt3 = if lib.versionOlder "4.02" ocaml.version
306+ then callPackage ../development/ocaml-modules/lwt {
307+ version = "3.0.0";
308+ }
309+ else throw "lwt3 is not available for OCaml ${ocaml.version}";
310+
305311 macaque = callPackage ../development/ocaml-modules/macaque { };
306312
307313 magic-mime = callPackage ../development/ocaml-modules/magic-mime { };