From 41b3b2c0776ff637fd33d4b12f33cbbbf95e8017 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Mon, 26 Jun 2017 04:38:49 +0200 Subject: [PATCH] =?UTF-8?q?ocamlPackages.sexplib=5Fp4:=20disable=20for=20O?= =?UTF-8?q?Caml=20=E2=89=A5=204.03?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/development/ocaml-modules/sexplib/108.08.00.nix | 4 +++- pkgs/development/ocaml-modules/sexplib/111.25.00.nix | 5 ++++- pkgs/development/ocaml-modules/sexplib/112.24.01.nix | 6 +++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/pkgs/development/ocaml-modules/sexplib/108.08.00.nix b/pkgs/development/ocaml-modules/sexplib/108.08.00.nix index a8acee1c538..685f2afb0b4 100644 --- a/pkgs/development/ocaml-modules/sexplib/108.08.00.nix +++ b/pkgs/development/ocaml-modules/sexplib/108.08.00.nix @@ -1,6 +1,8 @@ {stdenv, fetchurl, ocaml, findlib, type_conv, camlp4}: -assert stdenv.lib.versionOlder "3.12" ocaml.version; +if !stdenv.lib.versionAtLeast ocaml.version "3.12" +|| stdenv.lib.versionAtLeast ocaml.version "4.03" +then throw "sexlib-108.08.00 is not available for OCaml ${ocaml.version}" else stdenv.mkDerivation { name = "ocaml-sexplib-108.08.00"; diff --git a/pkgs/development/ocaml-modules/sexplib/111.25.00.nix b/pkgs/development/ocaml-modules/sexplib/111.25.00.nix index a8724f23cfe..e98a2ecdb30 100644 --- a/pkgs/development/ocaml-modules/sexplib/111.25.00.nix +++ b/pkgs/development/ocaml-modules/sexplib/111.25.00.nix @@ -1,6 +1,9 @@ {stdenv, fetchurl, ocaml, findlib, type_conv, camlp4}: -assert stdenv.lib.versionOlder "4.00" ocaml.version; +if !stdenv.lib.versionAtLeast ocaml.version "4.00" +|| stdenv.lib.versionAtLeast ocaml.version "4.03" +then throw "sexlib-111.25.00 is not available for OCaml ${ocaml.version}" else + stdenv.mkDerivation { name = "ocaml-sexplib-111.25.00"; diff --git a/pkgs/development/ocaml-modules/sexplib/112.24.01.nix b/pkgs/development/ocaml-modules/sexplib/112.24.01.nix index b63b5af05e8..24cdb497189 100644 --- a/pkgs/development/ocaml-modules/sexplib/112.24.01.nix +++ b/pkgs/development/ocaml-modules/sexplib/112.24.01.nix @@ -1,4 +1,8 @@ -{stdenv, buildOcaml, fetchurl, type_conv, camlp4}: +{ stdenv, buildOcaml, fetchurl, ocaml, type_conv, camlp4 }: + +if !stdenv.lib.versionAtLeast ocaml.version "4.02" +|| stdenv.lib.versionAtLeast ocaml.version "4.03" +then throw "sexlib-112.24.01 is not available for OCaml ${ocaml.version}" else buildOcaml rec { minimumSupportedOcamlVersion = "4.02";