ocamlPackages.zarith: 1.13 → 1.14

This commit is contained in:
Vincent Laporte 2024-07-12 06:58:39 +02:00
parent 4f74d5e6d4
commit 563a6f804f
No known key found for this signature in database
GPG Key ID: EBD582ADDDB1F81F
2 changed files with 12 additions and 6 deletions

View File

@ -1,20 +1,24 @@
{ lib, stdenv, fetchFromGitHub { lib, stdenv, fetchFromGitHub
, ocaml, findlib, pkg-config , ocaml, findlib, pkg-config
, gmp , gmp
, version ? if lib.versionAtLeast ocaml.version "4.08" then "1.14" else "1.13"
}: }:
if lib.versionOlder ocaml.version "4.04" if lib.versionOlder ocaml.version "4.04"
then throw "zarith is not available for OCaml ${ocaml.version}" then throw "zarith is not available for OCaml ${ocaml.version}"
else else
stdenv.mkDerivation rec { stdenv.mkDerivation (finalAttrs: {
pname = "ocaml${ocaml.version}-zarith"; pname = "ocaml${ocaml.version}-zarith";
version = "1.13"; inherit version;
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "ocaml"; owner = "ocaml";
repo = "Zarith"; repo = "Zarith";
rev = "release-${version}"; rev = "release-${version}";
sha256 = "sha256-CNVKoJeO3fsmWaV/dwnUA8lgI4ZlxR/LKCXpCXUrpSg="; hash = {
"1.13" = "sha256-CNVKoJeO3fsmWaV/dwnUA8lgI4ZlxR/LKCXpCXUrpSg=";
"1.14" = "sha256-xUrBDr+M8uW2KOy7DZieO/vDgsSOnyBnpOzQDlXJ0oE=";
}."${finalAttrs.version}";
}; };
nativeBuildInputs = [ pkg-config ocaml findlib ]; nativeBuildInputs = [ pkg-config ocaml findlib ];
@ -31,9 +35,9 @@ stdenv.mkDerivation rec {
meta = with lib; { meta = with lib; {
description = "Fast, arbitrary precision OCaml integers"; description = "Fast, arbitrary precision OCaml integers";
homepage = "https://github.com/ocaml/Zarith"; homepage = "https://github.com/ocaml/Zarith";
changelog = "https://github.com/ocaml/Zarith/raw/${src.rev}/Changes"; changelog = "https://github.com/ocaml/Zarith/raw/${finalAttrs.src.rev}/Changes";
license = licenses.lgpl2; license = licenses.lgpl2;
inherit (ocaml.meta) platforms; inherit (ocaml.meta) platforms;
maintainers = with maintainers; [ thoughtpolice vbgl ]; maintainers = with maintainers; [ thoughtpolice vbgl ];
}; };
} })

View File

@ -9529,7 +9529,9 @@ with pkgs;
last-resort = callPackage ../data/fonts/last-resort { }; last-resort = callPackage ../data/fonts/last-resort { };
ligo = ligo =
let ocaml_p = ocaml-ng.ocamlPackages_4_14; in let ocaml_p = ocaml-ng.ocamlPackages_4_14.overrideScope (self: super: {
zarith = super.zarith.override { version = "1.13"; };
}); in
callPackage ../development/compilers/ligo { callPackage ../development/compilers/ligo {
coq = coq_8_13.override { coq = coq_8_13.override {
customOCamlPackages = ocaml_p; customOCamlPackages = ocaml_p;