From 718b6d980f0a1b6841e464e8b25bf06a57be6c7f Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Fri, 20 Sep 2019 17:14:39 +0000 Subject: [PATCH] =?UTF-8?q?ocamlPackages.ptmap:=202.0.3=20=E2=86=92=202.0.?= =?UTF-8?q?4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ensures compatibility with OCaml 4.07 --- .../development/ocaml-modules/ptmap/default.nix | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/pkgs/development/ocaml-modules/ptmap/default.nix b/pkgs/development/ocaml-modules/ptmap/default.nix index 91b0d22a8528..d6637d23052c 100644 --- a/pkgs/development/ocaml-modules/ptmap/default.nix +++ b/pkgs/development/ocaml-modules/ptmap/default.nix @@ -1,13 +1,22 @@ { stdenv, fetchzip, ocaml, findlib, obuild }: -let version = "2.0.3"; in +let param = + if stdenv.lib.versionAtLeast ocaml.version "4.07" + then { + version = "2.0.4"; + sha256 = "05a391m1l04zigi6ghywj7f5kxy2w6186221k7711wmg56m94yjw"; + } else { + version = "2.0.3"; + sha256 = "19xykhqk7q25r1pj8rpfj53j2r9ls8mxi1w5m2wqshrf20gf078h"; + } +; in stdenv.mkDerivation { - name = "ocaml${ocaml.version}-ptmap-${version}"; + name = "ocaml${ocaml.version}-ptmap-${param.version}"; src = fetchzip { - url = "https://github.com/backtracking/ptmap/archive/v${version}.tar.gz"; - sha256 = "19xykhqk7q25r1pj8rpfj53j2r9ls8mxi1w5m2wqshrf20gf078h"; + url = "https://github.com/backtracking/ptmap/archive/v${param.version}.tar.gz"; + inherit (param) sha256; }; buildInputs = [ ocaml findlib obuild ];