From 745a86726adb4565d4eb6018d70ccacfc64851b3 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Fri, 28 Aug 2020 07:37:15 +0200 Subject: [PATCH] ocamlPackages.re: disable tests with OCaml < 4.04 --- pkgs/development/ocaml-modules/re/default.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/development/ocaml-modules/re/default.nix b/pkgs/development/ocaml-modules/re/default.nix index 2031c469b29..8881821490a 100644 --- a/pkgs/development/ocaml-modules/re/default.nix +++ b/pkgs/development/ocaml-modules/re/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchzip, buildDunePackage, ounit, seq }: +{ lib, fetchzip, buildDunePackage, ocaml, ounit, seq }: buildDunePackage rec { pname = "re"; @@ -11,14 +11,14 @@ buildDunePackage rec { sha256 = "07ycb103mr4mrkxfd63cwlsn023xvcjp0ra0k7n2gwrg0mwxmfss"; }; - buildInputs = [ ounit ]; + buildInputs = lib.optional doCheck ounit; propagatedBuildInputs = [ seq ]; - doCheck = true; + doCheck = lib.versionAtLeast ocaml.version "4.04"; meta = { homepage = "https://github.com/ocaml/ocaml-re"; description = "Pure OCaml regular expressions, with support for Perl and POSIX-style strings"; - license = stdenv.lib.licenses.lgpl2; - maintainers = with stdenv.lib.maintainers; [ vbgl ]; + license = lib.licenses.lgpl2; + maintainers = with lib.maintainers; [ vbgl ]; }; }