diff --git a/pkgs/development/ocaml-modules/easy_logging/default.nix b/pkgs/development/ocaml-modules/easy_logging/default.nix new file mode 100644 index 000000000000..463c3f654a0f --- /dev/null +++ b/pkgs/development/ocaml-modules/easy_logging/default.nix @@ -0,0 +1,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; + }; +}) diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 6802e6228f46..fe300b2eeac4 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -541,6 +541,8 @@ let easy-format = callPackage ../development/ocaml-modules/easy-format { }; + easy_logging = callPackage ../development/ocaml-modules/easy_logging { }; + eigen = callPackage ../development/ocaml-modules/eigen { stdenv = pkgs.gcc14Stdenv; };