mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-08-25 17:55:21 +00:00
ocamlPackages.bitstring: 4.1.1 → 5.0.2 (#554993)
This commit is contained in:
@@ -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 ];
|
||||
|
||||
@@ -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";
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user