From 97c886e2c727f1464eae5425e7bbe3b3b84ca4c5 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Wed, 17 Jun 2020 07:26:25 +0200 Subject: [PATCH] ocamlPackages.lwt2: remove at 2.7.1 --- pkgs/development/ocaml-modules/lwt/legacy.nix | 58 ------------------- pkgs/top-level/ocaml-packages.nix | 4 +- 2 files changed, 1 insertion(+), 61 deletions(-) delete mode 100644 pkgs/development/ocaml-modules/lwt/legacy.nix diff --git a/pkgs/development/ocaml-modules/lwt/legacy.nix b/pkgs/development/ocaml-modules/lwt/legacy.nix deleted file mode 100644 index 795baa0467e..00000000000 --- a/pkgs/development/ocaml-modules/lwt/legacy.nix +++ /dev/null @@ -1,58 +0,0 @@ -{ stdenv, buildOcaml, fetchzip, which, cryptopp, ocaml, findlib, ocamlbuild, camlp4 -, react, ssl, libev, pkgconfig, ncurses, glib -, ppx_tools, result, cppo -, ppxSupport ? stdenv.lib.versionAtLeast ocaml.version "4.02" -, version ? if stdenv.lib.versionAtLeast ocaml.version "4.02" then "2.7.1" else "2.6.0" -}: - -if !stdenv.lib.versionAtLeast ocaml.version "4" - || stdenv.lib.versionAtLeast ocaml.version "4.06" -then throw "lwt is not available for OCaml ${ocaml.version}" -else - -let sha256 = { - "3.0.0" = "0wwhnl9hppixcsdisinj1wmffx0nv6hkpm01z9qvkngkrazi3i88"; - "2.7.1" = "0w7f59havrl2fsnvs84lm7wlqpsrldg80gy5afpnpr21zkw22g8w"; - "2.6.0" = "0f1h83zh60rspm4fxd96z9h5bkhq1n1q968hgq92sq4a6bfi1c2w"; -}.${version}; in - -let optionals = stdenv.lib.optionals (!stdenv.lib.versionAtLeast version "3"); in - -buildOcaml { - name = "lwt"; - inherit version; - - src = fetchzip { - url = "https://github.com/ocsigen/lwt/archive/${version}.tar.gz"; - inherit sha256; - }; - - nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ which cryptopp ocaml findlib ocamlbuild glib ncurses camlp4 cppo ] - ++ stdenv.lib.optional ppxSupport ppx_tools; - - propagatedBuildInputs = [ result ] - ++ optionals [ react ssl ] - ++ [ libev ]; - - configureScript = "ocaml setup.ml -configure"; - prefixKey = "--prefix "; - configureFlags = - optionals [ "--enable-glib" "--enable-ssl" "--enable-react" ] - ++ [ "--enable-camlp4" ] - ++ [ (if ppxSupport then "--enable-ppx" else "--disable-ppx") ]; - - createFindlibDestdir = true; - - hasSharedObjects = true; - - meta = with stdenv.lib; { - homepage = "http://ocsigen.org/lwt"; - description = "Lightweight thread library for Objective Caml"; - license = licenses.lgpl21; - platforms = ocaml.meta.platforms or []; - maintainers = with maintainers; [ - maggesi vbgl gal_bolle - ]; - }; -} diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index d5d7a81a087..644da2d2409 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -467,11 +467,9 @@ let lua-ml = callPackage ../development/ocaml-modules/lua-ml { }; - lwt2 = callPackage ../development/ocaml-modules/lwt/legacy.nix { }; - lwt4 = callPackage ../development/ocaml-modules/lwt/4.x.nix { }; - ocaml_lwt = if lib.versionOlder "4.02" ocaml.version then lwt4 else lwt2; + ocaml_lwt = lwt4; lwt_camlp4 = callPackage ../development/ocaml-modules/lwt/camlp4.nix { };