From 491a3d732fa31b3ca38af680a00d2118ffa7a954 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Fri, 28 Jul 2023 07:29:16 +0200 Subject: [PATCH] ocamlPackages.{trace,trace-tef}: init at 0.2 --- .../ocaml-modules/trace/default.nix | 21 +++++++++++++++++++ pkgs/development/ocaml-modules/trace/tef.nix | 15 +++++++++++++ pkgs/top-level/ocaml-packages.nix | 4 ++++ 3 files changed, 40 insertions(+) create mode 100644 pkgs/development/ocaml-modules/trace/default.nix create mode 100644 pkgs/development/ocaml-modules/trace/tef.nix diff --git a/pkgs/development/ocaml-modules/trace/default.nix b/pkgs/development/ocaml-modules/trace/default.nix new file mode 100644 index 000000000000..208a879b1d1c --- /dev/null +++ b/pkgs/development/ocaml-modules/trace/default.nix @@ -0,0 +1,21 @@ +{ lib, fetchurl, buildDunePackage }: + +buildDunePackage rec { + pname = "trace"; + version = "0.2"; + + minimalOCamlVersion = "4.05"; + + src = fetchurl { + url = "https://github.com/c-cube/trace/releases/download/v${version}/trace-${version}.tbz"; + hash = "sha256-iScnZxjgzDqZFxbDDXB0K4TkdDJDcrMC03sK/ltbqJQ="; + }; + + meta = { + description = "Common interface for tracing/instrumentation libraries in OCaml"; + license = lib.licenses.mit; + homepage = "https://c-cube.github.io/trace/"; + maintainers = [ lib.maintainers.vbgl ]; + }; + +} diff --git a/pkgs/development/ocaml-modules/trace/tef.nix b/pkgs/development/ocaml-modules/trace/tef.nix new file mode 100644 index 000000000000..c1a6f9251554 --- /dev/null +++ b/pkgs/development/ocaml-modules/trace/tef.nix @@ -0,0 +1,15 @@ +{ buildDunePackage, trace, mtime }: + +buildDunePackage { + pname = "trace-tef"; + inherit (trace) src version; + + propagatedBuildInputs = [ mtime trace ]; + + doCheck = true; + + meta = trace.meta // { + description = "A simple backend for trace, emitting Catapult JSON into a file"; + }; + +} diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 02e659de3a99..de2acdd372da 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -1643,6 +1643,10 @@ let inherit (pkgs.python3Packages) torch; }; + trace = callPackage ../development/ocaml-modules/trace { }; + + trace-tef = callPackage ../development/ocaml-modules/trace/tef.nix { }; + trie = callPackage ../development/ocaml-modules/trie { }; tsdl = callPackage ../development/ocaml-modules/tsdl {