From 752351e889ebdf458eddcf22d31ffcecb39c75e5 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Fri, 28 Apr 2017 16:13:54 +0000 Subject: [PATCH] ocamlPackages: make explicit some version requirements --- pkgs/development/ocaml-modules/base/default.nix | 3 +++ pkgs/development/ocaml-modules/functoria/default.nix | 3 +++ pkgs/development/ocaml-modules/spacetime_lib/default.nix | 3 +++ 3 files changed, 9 insertions(+) diff --git a/pkgs/development/ocaml-modules/base/default.nix b/pkgs/development/ocaml-modules/base/default.nix index 4c92c7f1ca1..f7627567f9c 100644 --- a/pkgs/development/ocaml-modules/base/default.nix +++ b/pkgs/development/ocaml-modules/base/default.nix @@ -1,5 +1,8 @@ { stdenv, fetchurl, ocaml, jbuilder, findlib }: +if !stdenv.lib.versionAtLeast ocaml.version "4.03" +then throw "base is not available for OCaml ${ocaml.version}" else + stdenv.mkDerivation { name = "ocaml${ocaml.version}-base-0.9.0"; diff --git a/pkgs/development/ocaml-modules/functoria/default.nix b/pkgs/development/ocaml-modules/functoria/default.nix index bfcdd4168ca..2d8c00c7238 100644 --- a/pkgs/development/ocaml-modules/functoria/default.nix +++ b/pkgs/development/ocaml-modules/functoria/default.nix @@ -2,6 +2,9 @@ , bos, cmdliner, ocamlgraph }: +if !stdenv.lib.versionAtLeast ocaml.version "4.03" +then throw "functoria is not available for OCaml ${ocaml.version}" else + stdenv.mkDerivation rec { name = "ocaml${ocaml.version}-functoria-${version}"; version = "2.0.2"; diff --git a/pkgs/development/ocaml-modules/spacetime_lib/default.nix b/pkgs/development/ocaml-modules/spacetime_lib/default.nix index c12e47968ef..1eb789ec269 100644 --- a/pkgs/development/ocaml-modules/spacetime_lib/default.nix +++ b/pkgs/development/ocaml-modules/spacetime_lib/default.nix @@ -1,5 +1,8 @@ { stdenv, fetchFromGitHub, ocaml, findlib, owee }: +if !stdenv.lib.versionAtLeast ocaml.version "4.04" +then throw "spacetime_lib is not available for OCaml ${ocaml.version}" else + stdenv.mkDerivation rec { name = "ocaml${ocaml.version}-spacetime_lib-${version}"; version = "0.1.0";