From 4c2fcb090b1f3e5b47eaa7bd33913b574a11e0a0 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Fri, 11 Oct 2024 07:15:48 +0200 Subject: [PATCH] =?UTF-8?q?ocamlPackages.uuidm:=200.9.8=20=E2=86=92=200.9.?= =?UTF-8?q?9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../development/ocaml-modules/uuidm/default.nix | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/pkgs/development/ocaml-modules/uuidm/default.nix b/pkgs/development/ocaml-modules/uuidm/default.nix index 83b8cacc77a0..cf354c5e898d 100644 --- a/pkgs/development/ocaml-modules/uuidm/default.nix +++ b/pkgs/development/ocaml-modules/uuidm/default.nix @@ -1,20 +1,21 @@ -{ lib, stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, cmdliner }: +{ lib, stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, cmdliner +, version ? if lib.versionAtLeast ocaml.version "4.14" then "0.9.9" else "0.9.8" +}: lib.throwIfNot (lib.versionAtLeast ocaml.version "4.08") "uuidm is not available for OCaml ${ocaml.version}" -stdenv.mkDerivation rec { - version = "0.9.8"; +stdenv.mkDerivation { + inherit version; pname = "uuidm"; src = fetchurl { url = "https://erratique.ch/software/uuidm/releases/uuidm-${version}.tbz"; - sha256 = "sha256-/GZbkJVDQu1UY8SliK282kUWAVMfOnpQadUlRT/tJrM="; + hash = { + "0.9.9" = "sha256-jOgNF05dpoU/XQEefSZhn3zSlQ1BA1b/U4Ib9j2mvFo="; + "0.9.8" = "sha256-/GZbkJVDQu1UY8SliK282kUWAVMfOnpQadUlRT/tJrM="; + }."${version}"; }; - postPatch = '' - substituteInPlace pkg/META --replace "bytes" "" - ''; - strictDeps = true; nativeBuildInputs = [ ocaml findlib ocamlbuild topkg ];