From 4b0da1885ff972d4680ae192fcaec333fdfb862f Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Mon, 9 May 2022 17:22:28 +0200 Subject: [PATCH] =?UTF-8?q?ocamlPackages.easy-format:=201.3.2=20=E2=86=92?= =?UTF-8?q?=201.3.3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ocaml-modules/easy-format/default.nix | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/pkgs/development/ocaml-modules/easy-format/default.nix b/pkgs/development/ocaml-modules/easy-format/default.nix index a3fb9722965..7e3fe5f483e 100644 --- a/pkgs/development/ocaml-modules/easy-format/default.nix +++ b/pkgs/development/ocaml-modules/easy-format/default.nix @@ -1,12 +1,22 @@ -{ lib, fetchurl, buildDunePackage }: +{ lib, fetchurl, ocaml, buildDunePackage }: + +let params = + if lib.versionAtLeast ocaml.version "4.08" then { + version = "1.3.3"; + sha256 = "sha256:05n4mm1yz33h9gw811ivjw7x4m26lpmf7kns9lza4v6227lwmz7a"; + } else { + version = "1.3.2"; + sha256 = "sha256:09hrikx310pac2sb6jzaa7k6fmiznnmhdsqij1gawdymhawc4h1l"; + }; +in buildDunePackage rec { pname = "easy-format"; - version = "1.3.2"; + inherit (params) version; src = fetchurl { url = "https://github.com/ocaml-community/easy-format/releases/download/${version}/easy-format-${version}.tbz"; - sha256 = "sha256:09hrikx310pac2sb6jzaa7k6fmiznnmhdsqij1gawdymhawc4h1l"; + inherit (params) sha256; }; doCheck = true;