nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 fetchFromGitHub,
4 buildDunePackage,
5 camlp-streams,
6 cppo,
7 cryptokit,
8 ocurl,
9 yojson,
10 ounit2,
11}:
12
13buildDunePackage (finalAttrs: {
14 pname = "gapi-ocaml";
15 version = if lib.versionAtLeast cryptokit.version "1.21" then "0.4.8" else "0.4.7";
16
17 src = fetchFromGitHub {
18 owner = "astrada";
19 repo = "gapi-ocaml";
20 tag = "v${finalAttrs.version}";
21 hash =
22 {
23 "0.4.7" = "sha256-uQJfrgF0oafURlamHslt9hX9MP4vFeVqDhuX7T/kjiY=";
24 "0.4.8" = "sha256-RvHcse3ech8BwnR0Kd1oE5ycAdSBpeQ0IGAp9egFbBY=";
25 }
26 ."${finalAttrs.version}";
27 };
28
29 nativeBuildInputs = [ cppo ];
30
31 propagatedBuildInputs = [
32 camlp-streams
33 cryptokit
34 ocurl
35 yojson
36 ];
37
38 doCheck = true;
39 checkInputs = [ ounit2 ];
40
41 meta = {
42 description = "OCaml client for google services";
43 homepage = "https://github.com/astrada/gapi-ocaml";
44 license = lib.licenses.mit;
45 maintainers = with lib.maintainers; [ bennofs ];
46 };
47})