From 4086a9cf45ef6d098b31262e814aeb58e630e098 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Thu, 5 Oct 2017 21:32:47 +0000 Subject: [PATCH] ocamlPackages.pprint: 20140424 -> 20171003 --- .../development/ocaml-modules/pprint/default.nix | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/pkgs/development/ocaml-modules/pprint/default.nix b/pkgs/development/ocaml-modules/pprint/default.nix index 83732eb1f75f..899806c4dae2 100644 --- a/pkgs/development/ocaml-modules/pprint/default.nix +++ b/pkgs/development/ocaml-modules/pprint/default.nix @@ -2,13 +2,23 @@ assert stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "3.12"; +let param = + if stdenv.lib.versionAtLeast ocaml.version "4.02" + then { + version = "20171003"; + sha256 = "06zwsskri8kaqjdszj9360nf36zvwh886xwf033aija8c9k4w6cx"; + } else { + version = "20140424"; + sha256 = "0sc9q89dnyarcg24czyhr6ams0ylqvia3745s6rfwd2nldpygsdk"; +}; in + stdenv.mkDerivation { - name = "ocaml-pprint-20140424"; + name = "ocaml${ocaml.version}-pprint-${param.version}"; src = fetchurl { - url = http://gallium.inria.fr/~fpottier/pprint/pprint-20140424.tar.gz; - sha256 = "0sc9q89dnyarcg24czyhr6ams0ylqvia3745s6rfwd2nldpygsdk"; + url = "http://gallium.inria.fr/~fpottier/pprint/pprint-${param.version}.tar.gz"; + inherit (param) sha256; }; buildInputs = [ ocaml findlib ocamlbuild ];