nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 ocaml,
4 buildDunePackage,
5 fetchFromGitHub,
6 findlib,
7 mdx,
8 qcheck-core,
9 ppx_inline_test,
10}:
11
12buildDunePackage rec {
13 pname = "patricia-tree";
14 version = "0.11.0";
15
16 minimalOCamlVersion = "4.14";
17
18 # Fix build with gcc15
19 env = lib.optionalAttrs (lib.versions.majorMinor ocaml.version == "5.0") {
20 NIX_CFLAGS_COMPILE = "-std=gnu11";
21 };
22
23 src = fetchFromGitHub {
24 owner = "codex-semantics-library";
25 repo = "patricia-tree";
26 tag = "v${version}";
27 hash = "sha256-lpmU0KhsyIHxPBiw38ssA7XFEMsRvOT03MByoJG88Xs=";
28 };
29
30 nativeCheckInputs = [
31 mdx.bin
32 ];
33
34 checkInputs = [
35 mdx
36 ppx_inline_test
37 qcheck-core
38 ];
39
40 doCheck = true;
41
42 meta = {
43 description = "Patricia Tree data structure in OCaml";
44 homepage = "https://codex.top/api/patricia-tree/";
45 downloadPage = "https://github.com/codex-semantics-library/patricia-tree";
46 changelog = "https://github.com/codex-semantics-library/patricia-tree/releases/tag/v${version}";
47 license = lib.licenses.lgpl21Only;
48 maintainers = [ lib.maintainers.ethancedwards8 ];
49 };
50}