From 522148ba4eb3767f1d1beb48a4aba7b6527a147b Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Wed, 9 Jan 2019 15:04:18 +0000 Subject: [PATCH] =?UTF-8?q?ocamlPackages.cmdliner:=20restore=20version=201?= =?UTF-8?q?.0.2=20for=20OCaml=20=E2=89=A4=204.02?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ocaml-modules/cmdliner/default.nix | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/pkgs/development/ocaml-modules/cmdliner/default.nix b/pkgs/development/ocaml-modules/cmdliner/default.nix index a4341ed98c63..c11aa41a4931 100644 --- a/pkgs/development/ocaml-modules/cmdliner/default.nix +++ b/pkgs/development/ocaml-modules/cmdliner/default.nix @@ -6,13 +6,23 @@ in assert stdenv.lib.versionAtLeast ocaml.version "4.01.0"; +let param = + if stdenv.lib.versionAtLeast ocaml.version "4.03" then { + version = "1.0.3"; + sha256 = "0g3w4hvc1cx9x2yp5aqn6m2rl8lf9x1dn754hfq8m1sc1102lxna"; + } else { + version = "1.0.2"; + sha256 = "18jqphjiifljlh9jg8zpl6310p3iwyaqphdkmf89acyaix0s4kj1"; + } +; in + stdenv.mkDerivation rec { - name = "ocaml-${pname}-${version}"; - version = "1.0.3"; + name = "ocaml${ocaml.version}-${pname}-${version}"; + inherit (param) version; src = fetchurl { url = "http://erratique.ch/software/${pname}/releases/${pname}-${version}.tbz"; - sha256 = "0g3w4hvc1cx9x2yp5aqn6m2rl8lf9x1dn754hfq8m1sc1102lxna"; + inherit (param) sha256; }; nativeBuildInputs = [ ocamlbuild topkg ];