summaryrefslogtreecommitdiffstats
path: root/pkgs/development/ocaml-modules/easy_logging/default.nix
blob: 463c3f654a0fb4ca7a1e845679ac61e9acb3edc2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
{
  lib,
  buildDunePackage,
  fetchFromGitHub,

  # propagatedBuildInputs,
  calendar,

  nix-update-script,
}:

buildDunePackage (finalAttrs: {
  pname = "easy_logging";
  version = "0.8.2";
  __structuredAttrs = true;

  src = fetchFromGitHub {
    owner = "sapristi";
    repo = "easy_logging";
    tag = "v${finalAttrs.version}";
    hash = "sha256-Xy6Rfef7r2K8DTok7AYa/9m3ZEV07LlUeMQSRayLBco=";
  };

  propagatedBuildInputs = [
    calendar
  ];

  doCheck = true;
  # Only run the tests for the `easy_logging` package itself.
  # The other directories belong to the separate `easy_logging_yojson` package, which is not built
  # here and pulls in additional dependencies.
  checkPhase = ''
    runHook preCheck

    dune runtest easy_logging ''${enableParallelBuilding:+-j $NIX_BUILD_CORES}

    runHook postCheck
  '';

  passthru.updateScript = nix-update-script { };

  meta = {
    description = "Logging module for OCaml";
    homepage = "https://github.com/sapristi/easy_logging";
    license = lib.licenses.mpl20;
    maintainers = with lib.maintainers; [ GaetanLepage ];
    platforms = lib.platforms.all;
  };
})