From c6bcb7dfb18861ed106239dbf062f027b5e4e862 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Thu, 28 Aug 2025 08:05:16 +0200 Subject: [PATCH 1/2] ocamlPackages.bstr: init at 0.0.2 --- .../ocaml-modules/bstr/default.nix | 24 +++++++++++++++++++ pkgs/top-level/ocaml-packages.nix | 2 ++ 2 files changed, 26 insertions(+) create mode 100644 pkgs/development/ocaml-modules/bstr/default.nix diff --git a/pkgs/development/ocaml-modules/bstr/default.nix b/pkgs/development/ocaml-modules/bstr/default.nix new file mode 100644 index 000000000000..37e342db4400 --- /dev/null +++ b/pkgs/development/ocaml-modules/bstr/default.nix @@ -0,0 +1,24 @@ +{ + fetchurl, + buildDunePackage, + lib, +}: + +buildDunePackage rec { + pname = "bstr"; + version = "0.0.2"; + + minimalOCamlVersion = "4.13"; + + src = fetchurl { + url = "https://github.com/robur-coop/bstr/releases/download/v${version}/bstr-${version}.tbz"; + hash = "sha256-/zvzCBzT014OesTmxGBDB98ZRU++YNDLUZ8uaDK3keM="; + }; + + meta = { + description = "A simple library for bigstrings"; + homepage = "https://git.robur.coop/robur/bstr"; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.vbgl ]; + }; +} diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index f025e1cfd9f6..2be1c4535a94 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -145,6 +145,8 @@ let brr = callPackage ../development/ocaml-modules/brr { }; + bstr = callPackage ../development/ocaml-modules/bstr { }; + bwd = callPackage ../development/ocaml-modules/bwd { }; bytesrw = callPackage ../development/ocaml-modules/bytesrw { }; From a03ce7ebd7f03ea82fb5bf611fe4c8f73d8f3c78 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Thu, 28 Aug 2025 08:05:20 +0200 Subject: [PATCH 2/2] =?UTF-8?q?ocamlPackages.h1:=201.0.0=20=E2=86=92=201.1?= =?UTF-8?q?.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/development/ocaml-modules/git/paf.nix | 5 +++++ pkgs/development/ocaml-modules/h1/default.nix | 10 ++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/pkgs/development/ocaml-modules/git/paf.nix b/pkgs/development/ocaml-modules/git/paf.nix index 55ab06726049..0867363720ca 100644 --- a/pkgs/development/ocaml-modules/git/paf.nix +++ b/pkgs/development/ocaml-modules/git/paf.nix @@ -23,6 +23,11 @@ buildDunePackage { inherit (git) version src; + postPatch = '' + substituteInPlace src/git-paf/dune --replace-fail bigstringaf 'bigstringaf bstr' + substituteInPlace src/git-paf/git_paf.ml --replace-fail Bigstringaf.t Bstr.t + ''; + minimalOCamlVersion = "4.08"; propagatedBuildInputs = [ diff --git a/pkgs/development/ocaml-modules/h1/default.nix b/pkgs/development/ocaml-modules/h1/default.nix index 0f7fdebff65c..aad1f760a65b 100644 --- a/pkgs/development/ocaml-modules/h1/default.nix +++ b/pkgs/development/ocaml-modules/h1/default.nix @@ -3,11 +3,12 @@ buildDunePackage, fetchurl, angstrom, - bigstringaf, + base64, + bstr, faraday, httpun-types, alcotest, - version ? "1.0.0", + version ? "1.1.0", }: buildDunePackage { @@ -17,12 +18,13 @@ buildDunePackage { src = fetchurl { url = "https://github.com/robur-coop/ocaml-h1/releases/download/v${version}/h1-${version}.tbz"; - hash = "sha256-uFHRcNmfHiFmdMAMKiS5KilIwMylf/AoJCfxllrIvRM="; + hash = "sha256-LTBn7TgBY5IBSfvpFJ1b2mMLT0XjwQvnk77qBqB8bTw="; }; propagatedBuildInputs = [ angstrom - bigstringaf + base64 + bstr faraday httpun-types ];