From 30a29edb9f2991ed1a26d88e8262fac0adb58fe6 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Fri, 21 Aug 2026 11:26:00 +0200 Subject: [PATCH] =?UTF-8?q?ocamlPackages.bitstring:=204.1.1=20=E2=86=92=20?= =?UTF-8?q?5.0.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ocaml-modules/bitstring/default.nix | 14 +++++++++----- pkgs/development/ocaml-modules/bitstring/ppx.nix | 10 +--------- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/pkgs/development/ocaml-modules/bitstring/default.nix b/pkgs/development/ocaml-modules/bitstring/default.nix index 4c612b177a7c..791620a77c08 100644 --- a/pkgs/development/ocaml-modules/bitstring/default.nix +++ b/pkgs/development/ocaml-modules/bitstring/default.nix @@ -1,21 +1,25 @@ { lib, fetchFromGitHub, + ocaml, buildDunePackage, stdlib-shims, }: buildDunePackage (finalAttrs: { pname = "bitstring"; - version = "4.1.1"; - - duneVersion = "3"; + version = if lib.versionAtLeast ocaml.version "5.3" then "5.0.2" else "4.1.1"; src = fetchFromGitHub { owner = "xguerin"; repo = "bitstring"; - rev = "v${finalAttrs.version}"; - sha256 = "sha256-eO7/S9PoMybZPnQQ+q9qbqKpYO4Foc9OjW4uiwwNds8="; + tag = "v${finalAttrs.version}"; + hash = + { + "5.0.2" = "sha256-MN16b37EM5NIZcvd59Y9Bd+YgcM62RdhrgCskd21tSg="; + "4.1.1" = "sha256-eO7/S9PoMybZPnQQ+q9qbqKpYO4Foc9OjW4uiwwNds8="; + } + ."${finalAttrs.version}"; }; propagatedBuildInputs = [ stdlib-shims ]; diff --git a/pkgs/development/ocaml-modules/bitstring/ppx.nix b/pkgs/development/ocaml-modules/bitstring/ppx.nix index 9215c8293d28..826e01501fb2 100644 --- a/pkgs/development/ocaml-modules/bitstring/ppx.nix +++ b/pkgs/development/ocaml-modules/bitstring/ppx.nix @@ -1,8 +1,6 @@ { lib, buildDunePackage, - fetchpatch, - ocaml, bitstring, ppxlib, ounit, @@ -12,21 +10,15 @@ buildDunePackage { pname = "ppx_bitstring"; inherit (bitstring) version src; - patches = lib.optional (lib.versionAtLeast ppxlib.version "0.36") (fetchpatch { - url = "https://github.com/xguerin/bitstring/commit/b42d4924cbb5ec5fd5309e6807852b63f456f35d.patch"; - hash = "sha256-wtpSnGOzIUTmB3LhyHGopecy7F/5SYFOwaR6eReV+6g="; - }); - buildInputs = [ bitstring ppxlib ]; - doCheck = lib.versionAtLeast ocaml.version "4.08"; + doCheck = true; checkInputs = [ ounit ]; meta = bitstring.meta // { description = "Bitstrings and bitstring matching for OCaml - PPX extension"; - broken = lib.versionOlder ppxlib.version "0.18.0"; }; }