ocamlPackages.num: 1.1 → 1.6

This commit is contained in:
Vincent Laporte
2025-09-01 21:08:06 +02:00
parent de2fd96686
commit 695187d203

View File

@@ -2,7 +2,6 @@
stdenv, stdenv,
lib, lib,
fetchFromGitHub, fetchFromGitHub,
fetchpatch,
ocaml, ocaml,
findlib, findlib,
withStatic ? false, withStatic ? false,
@@ -10,22 +9,21 @@
stdenv.mkDerivation ( stdenv.mkDerivation (
rec { rec {
version = "1.1"; version = "1.6";
pname = "ocaml${ocaml.version}-num"; pname = "ocaml${ocaml.version}-num";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "ocaml"; owner = "ocaml";
repo = "num"; repo = "num";
rev = "v${version}"; tag = "v${version}";
sha256 = "0a4mhxgs5hi81d227aygjx35696314swas0vzy3ig809jb7zq4h0"; hash = "sha256-JWn0WBsbKpiUlxRDaXmwXVbL2WhqQIDrXiZk1aXeEtQ=";
}; };
patches = [ patches = lib.optional withStatic ./enable-static.patch;
(fetchpatch {
url = "https://github.com/ocaml/num/commit/6d4c6d476c061298e6385e8a0864f083194b9307.patch"; postPatch = ''
sha256 = "18zlvb5n327q8y3c52js5dvyy29ssld1l53jqng8m9w1k24ypi0b"; substituteInPlace num.opam --replace-fail '1.7~dev' "${version}"
}) substituteInPlace src/Makefile --replace-fail "cp META.num META" "mv META.num META"
] '';
++ lib.optional withStatic ./enable-static.patch;
nativeBuildInputs = [ nativeBuildInputs = [
ocaml ocaml
@@ -36,6 +34,8 @@ stdenv.mkDerivation (
createFindlibDestdir = true; createFindlibDestdir = true;
installTargets = "findlib-install";
meta = { meta = {
description = "Legacy Num library for arbitrary-precision integer and rational arithmetic"; description = "Legacy Num library for arbitrary-precision integer and rational arithmetic";
license = lib.licenses.lgpl21; license = lib.licenses.lgpl21;