From 927fcf37933ddd24a0e16c6a45b9c0a687a40607 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Fri, 24 Apr 2020 07:28:35 +0200 Subject: [PATCH] ocamlPackages.uri: remove at 1.9.{1,2} MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These are legacy versions for OCaml ≤ 4.02 --- .../development/ocaml-modules/uri/default.nix | 1 + pkgs/development/ocaml-modules/uri/legacy.nix | 51 ------------------- pkgs/top-level/ocaml-packages.nix | 9 +--- 3 files changed, 2 insertions(+), 59 deletions(-) delete mode 100644 pkgs/development/ocaml-modules/uri/legacy.nix diff --git a/pkgs/development/ocaml-modules/uri/default.nix b/pkgs/development/ocaml-modules/uri/default.nix index cfbcc27ba9c..6a7c03b9bb6 100644 --- a/pkgs/development/ocaml-modules/uri/default.nix +++ b/pkgs/development/ocaml-modules/uri/default.nix @@ -3,6 +3,7 @@ }: buildDunePackage rec { + minimumOCamlVersion = "4.03"; pname = "uri"; version = "3.1.0"; diff --git a/pkgs/development/ocaml-modules/uri/legacy.nix b/pkgs/development/ocaml-modules/uri/legacy.nix deleted file mode 100644 index 474ab927885..00000000000 --- a/pkgs/development/ocaml-modules/uri/legacy.nix +++ /dev/null @@ -1,51 +0,0 @@ -{ stdenv, fetchzip, ocaml, findlib, ocamlbuild, re, stringext, ounit -, sexplib, ppx_sexp_conv -, legacyVersion ? false -, sexplib_p4 -}: - -if !stdenv.lib.versionAtLeast ocaml.version "4" -|| legacyVersion && stdenv.lib.versionAtLeast ocaml.version "4.03" -then throw "uri${stdenv.lib.optionalString legacyVersion "_p4"} is not available for OCaml ${ocaml.version}" else - -with - if legacyVersion - then { - version = "1.9.1"; - sha256 = "0v3jxqgyi4kj92r3x83rszfpnvvzy9lyb913basch4q64yka3w85"; - } else { - version = "1.9.2"; - sha256 = "137pg8j654x7r0d1664iy2zp3l82nki1kkh921lwdrwc5qqdl6jx"; - }; - -stdenv.mkDerivation { - name = "ocaml${ocaml.version}-uri-${version}"; - - src = fetchzip { - url = "https://github.com/mirage/ocaml-uri/archive/v${version}.tar.gz"; - inherit sha256; - }; - - buildInputs = [ ocaml findlib ocamlbuild ounit ] - ++ stdenv.lib.optional (!legacyVersion) ppx_sexp_conv; - propagatedBuildInputs = [ re (if legacyVersion then sexplib_p4 else sexplib) stringext ]; - - configurePhase = "ocaml setup.ml -configure --prefix $out --enable-tests"; - buildPhase = '' - ocaml setup.ml -build - ocaml setup.ml -doc - ''; - doCheck = true; - checkPhase = "ocaml setup.ml -test"; - installPhase = "ocaml setup.ml -install"; - - createFindlibDestdir = true; - - meta = { - homepage = "https://github.com/mirage/ocaml-uri"; - platforms = ocaml.meta.platforms or []; - description = "RFC3986 URI parsing library for OCaml"; - license = stdenv.lib.licenses.isc; - maintainers = with stdenv.lib.maintainers; [ vbgl ]; - }; -} diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index d75b8bc6a2a..dd92168e408 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -926,17 +926,10 @@ let uucp = callPackage ../development/ocaml-modules/uucp { }; uunf = callPackage ../development/ocaml-modules/uunf { }; - uri = - if lib.versionAtLeast ocaml.version "4.3" - then callPackage ../development/ocaml-modules/uri { } - else callPackage ../development/ocaml-modules/uri/legacy.nix { }; + uri = callPackage ../development/ocaml-modules/uri { }; uri-sexp = callPackage ../development/ocaml-modules/uri/sexp.nix { }; - uri_p4 = callPackage ../development/ocaml-modules/uri/legacy.nix { - legacyVersion = true; - }; - uuseg = callPackage ../development/ocaml-modules/uuseg { }; uutf = callPackage ../development/ocaml-modules/uutf { };