From 9c68a8b2d23270cca2746706fbccb8815a962fb9 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Tue, 27 Jun 2017 17:28:25 +0000 Subject: [PATCH] ocamlPackages.angstrom: 0.4.0 -> 0.5.1 --- .../ocaml-modules/angstrom/default.nix | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/pkgs/development/ocaml-modules/angstrom/default.nix b/pkgs/development/ocaml-modules/angstrom/default.nix index fadb55907bf..4f968ce6c09 100644 --- a/pkgs/development/ocaml-modules/angstrom/default.nix +++ b/pkgs/development/ocaml-modules/angstrom/default.nix @@ -1,14 +1,25 @@ { stdenv, fetchFromGitHub, ocaml, ocamlbuild, cstruct, result, findlib, ocaml_oasis }: +let param = + if stdenv.lib.versionAtLeast ocaml.version "4.03" + then { + version = "0.5.1"; + sha256 = "0rm79xyszy9aqvflcc13y9xiya82z31fzmr3b3hx91pmqviymhgc"; + } else { + version = "0.4.0"; + sha256 = "019s3jwhnswa914bgj1fa6q67k0bl2ahqdaqfnavcbyii8763kh2"; + }; +in + stdenv.mkDerivation rec { - version = "0.4.0"; + inherit (param) version; name = "ocaml-angstrom-${version}"; src = fetchFromGitHub { owner = "inhabitedtype"; repo = "angstrom"; rev = "${version}"; - sha256 = "019s3jwhnswa914bgj1fa6q67k0bl2ahqdaqfnavcbyii8763kh2"; + inherit (param) sha256; }; createFindlibDestdir = true;