From b34716334fd4def65a7394890938cce201cdc166 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Wed, 22 Mar 2023 06:11:54 +0100 Subject: [PATCH 1/4] ocamlPackages.uecc: use Dune 3 --- pkgs/development/ocaml-modules/uecc/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/ocaml-modules/uecc/default.nix b/pkgs/development/ocaml-modules/uecc/default.nix index efb86d862476..1185977132dd 100644 --- a/pkgs/development/ocaml-modules/uecc/default.nix +++ b/pkgs/development/ocaml-modules/uecc/default.nix @@ -4,6 +4,8 @@ buildDunePackage rec { pname = "uecc"; version = "0.4"; + duneVersion = "3"; + src = fetchFromGitLab { owner = "nomadic-labs"; repo = "ocaml-uecc"; From 9e37176f06195a9d2480b95496ce7262dbb44efb Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Wed, 22 Mar 2023 06:12:00 +0100 Subject: [PATCH 2/4] =?UTF-8?q?ocamlPackages.hidapi:=201.1.1=20=E2=86=92?= =?UTF-8?q?=201.1.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../development/ocaml-modules/hidapi/default.nix | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/pkgs/development/ocaml-modules/hidapi/default.nix b/pkgs/development/ocaml-modules/hidapi/default.nix index 68fc506222de..b47c153a4974 100644 --- a/pkgs/development/ocaml-modules/hidapi/default.nix +++ b/pkgs/development/ocaml-modules/hidapi/default.nix @@ -1,19 +1,21 @@ -{ pkgs, lib, fetchurl, buildDunePackage, pkg-config, dune-configurator +{ pkgs, lib, fetchFromGitHub, buildDunePackage, pkg-config, dune-configurator , bigstring, }: buildDunePackage rec { pname = "hidapi"; - version = "1.1.1"; + version = "1.1.2"; - useDune2 = true; + duneVersion = "3"; - src = fetchurl { - url = "https://github.com/vbmithr/ocaml-hidapi/releases/download/${version}/${pname}-${version}.tbz"; - sha256 = "1j7rd7ajrzla76r3sxljx6fb18f4f4s3jd7vhv59l2ilxyxycai2"; + src = fetchFromGitHub { + owner = "vbmithr"; + repo = "ocaml-hidapi"; + rev = version; + hash = "sha256-SNQ1/i5wJJgcslIUBe+z5QgHns/waHnILyMUJ46cUwg="; }; - minimumOCamlVersion = "4.03"; + minimalOCamlVersion = "4.03"; nativeBuildInputs = [ pkg-config ]; buildInputs = [ pkgs.hidapi dune-configurator ]; From 213349f3ad345ed5893717e5d9c60dddda79e4fc Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Wed, 22 Mar 2023 06:12:05 +0100 Subject: [PATCH 3/4] =?UTF-8?q?ocamlPackages.secp256k1-internal:=200.3=20?= =?UTF-8?q?=E2=86=92=200.4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ocaml-modules/secp256k1-internal/default.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkgs/development/ocaml-modules/secp256k1-internal/default.nix b/pkgs/development/ocaml-modules/secp256k1-internal/default.nix index 4a9a761ab30c..b403b997027b 100644 --- a/pkgs/development/ocaml-modules/secp256k1-internal/default.nix +++ b/pkgs/development/ocaml-modules/secp256k1-internal/default.nix @@ -11,15 +11,16 @@ buildDunePackage rec { pname = "secp256k1-internal"; - version = "0.3"; + version = "0.4"; src = fetchFromGitLab { owner = "nomadic-labs"; repo = "ocaml-secp256k1-internal"; - rev = version; - sha256 = "sha256-1wvQ4RW7avcGsIc0qgDzhGrwOBY0KHrtNVHCj2cgNzo="; + rev = "v${version}"; + hash = "sha256-amVtp94cE1NxClWJgcJvRmilnQlC7z44mORUaxvPn00="; }; minimalOCamlVersion = "4.08"; + duneVersion = "3"; propagatedBuildInputs = [ gmp From 8ede16564f5479675b60cd3a82a2a59edb0c2184 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Wed, 22 Mar 2023 06:12:11 +0100 Subject: [PATCH 4/4] ocamlPackages.bigstring: use Dune 3 & fix for OCaml 5 --- pkgs/development/ocaml-modules/bigstring/default.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pkgs/development/ocaml-modules/bigstring/default.nix b/pkgs/development/ocaml-modules/bigstring/default.nix index f966e0b90b1b..650522363d31 100644 --- a/pkgs/development/ocaml-modules/bigstring/default.nix +++ b/pkgs/development/ocaml-modules/bigstring/default.nix @@ -1,12 +1,16 @@ -{ lib, fetchFromGitHub, buildDunePackage }: +{ lib, fetchFromGitHub, buildDunePackage, ocaml }: buildDunePackage rec { pname = "bigstring"; version = "0.3"; - useDune2 = true; + duneVersion = "3"; + minimalOCamlVersion = "4.03"; - minimumOCamlVersion = "4.03"; + # Ensure compatibility with OCaml ≥ 5.0 + preConfigure = lib.optional (lib.versionAtLeast ocaml.version "4.08") '' + substituteInPlace src/dune --replace '(libraries bytes bigarray)' "" + ''; src = fetchFromGitHub { owner = "c-cube";