nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildDunePackage,
4 fetchurl,
5 ke,
6 duff,
7 decompress,
8 cstruct,
9 optint,
10 bigstringaf,
11 checkseum,
12 logs,
13 psq,
14 fmt,
15 result,
16 rresult,
17 fpath,
18 base64,
19 bos,
20 digestif,
21 alcotest,
22 crowbar,
23 alcotest-lwt,
24 lwt,
25 findlib,
26 mirage-flow,
27 cmdliner,
28 hxd,
29 getconf,
30 replaceVars,
31}:
32
33buildDunePackage rec {
34 pname = "carton";
35 version = "0.7.0";
36
37 minimalOCamlVersion = "4.08";
38
39 src = fetchurl {
40 url = "https://github.com/mirage/ocaml-git/releases/download/${pname}-v${version}/git-${pname}-v${version}.tbz";
41 hash = "sha256-vWkBJdP4ZpRCEwzrFMzsdHay4VyiXix/+1qzk+7yDvk=";
42 };
43
44 patches = [
45 (replaceVars ./carton-find-getconf.patch {
46 getconf = "${getconf}";
47 })
48 ];
49
50 # remove changelogs for mimic and the git* packages
51 postPatch = ''
52 rm CHANGES.md
53 '';
54
55 buildInputs = [
56 cmdliner
57 digestif
58 result
59 rresult
60 fpath
61 bos
62 hxd
63 ];
64 propagatedBuildInputs = [
65 ke
66 duff
67 decompress
68 cstruct
69 optint
70 bigstringaf
71 checkseum
72 logs
73 psq
74 fmt
75 ];
76
77 doCheck = true;
78 nativeBuildInputs = [
79 findlib
80 ];
81 checkInputs = [
82 base64
83 alcotest
84 alcotest-lwt
85 crowbar
86 lwt
87 mirage-flow
88 ];
89
90 meta = {
91 description = "Implementation of PACKv2 file in OCaml";
92 license = lib.licenses.mit;
93 homepage = "https://github.com/mirage/ocaml-git";
94 maintainers = [ lib.maintainers.sternenseemann ];
95 };
96}