From 5d5089297eadba0609854e374c5ed6627929036f Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Wed, 3 May 2023 22:08:21 +0200 Subject: [PATCH] ocamlPackages.result: pin Dune to version 1 for OCaml < 4.08 --- pkgs/development/ocaml-modules/ocaml-result/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/development/ocaml-modules/ocaml-result/default.nix b/pkgs/development/ocaml-modules/ocaml-result/default.nix index 2fda6f1440b..15e8f96a484 100644 --- a/pkgs/development/ocaml-modules/ocaml-result/default.nix +++ b/pkgs/development/ocaml-modules/ocaml-result/default.nix @@ -1,11 +1,9 @@ { lib, buildDunePackage, fetchurl, ocaml }: -buildDunePackage rec { +buildDunePackage (rec { pname = "result"; version = "1.5"; - useDune2 = lib.versionAtLeast ocaml.version "4.08"; - src = fetchurl { url = "https://github.com/janestreet/result/releases/download/${version}/result-${version}.tbz"; sha256 = "0cpfp35fdwnv3p30a06wd0py3805qxmq3jmcynjc3x2qhlimwfkw"; @@ -21,4 +19,6 @@ buildDunePackage rec { ''; license = lib.licenses.bsd3; }; -} +} // lib.optionalAttrs (!lib.versionAtLeast ocaml.version "4.08") { + duneVersion = "1"; +})