From c069b1b7bdd853410a8f236b9d0683d5e673efd7 Mon Sep 17 00:00:00 2001 From: Johannes Maier Date: Fri, 12 Apr 2024 10:03:32 +0200 Subject: [PATCH] ocamlPackages.landmarks{,-ppx}: init at 1.4 --- .../ocaml-modules/landmarks-ppx/default.nix | 18 +++++++++++++++ .../ocaml-modules/landmarks/default.nix | 23 +++++++++++++++++++ pkgs/top-level/ocaml-packages.nix | 4 ++++ 3 files changed, 45 insertions(+) create mode 100644 pkgs/development/ocaml-modules/landmarks-ppx/default.nix create mode 100644 pkgs/development/ocaml-modules/landmarks/default.nix diff --git a/pkgs/development/ocaml-modules/landmarks-ppx/default.nix b/pkgs/development/ocaml-modules/landmarks-ppx/default.nix new file mode 100644 index 000000000000..c55836a9b75e --- /dev/null +++ b/pkgs/development/ocaml-modules/landmarks-ppx/default.nix @@ -0,0 +1,18 @@ +{ lib, fetchFromGitHub, buildDunePackage, ocaml, landmarks, ppxlib }: + +buildDunePackage { + pname = "landmarks-ppx"; + minimalOCamlVersion = "4.08"; + + inherit (landmarks) src version; + + buildInputs = [ ppxlib ]; + propagatedBuildInputs = [ landmarks ]; + + doCheck = lib.versionAtLeast ocaml.version "4.08" + && lib.versionOlder ocaml.version "5.0"; + + meta = landmarks.meta // { + description = "Preprocessor instrumenting code using the landmarks library"; + }; +} diff --git a/pkgs/development/ocaml-modules/landmarks/default.nix b/pkgs/development/ocaml-modules/landmarks/default.nix new file mode 100644 index 000000000000..d501e4e3c51a --- /dev/null +++ b/pkgs/development/ocaml-modules/landmarks/default.nix @@ -0,0 +1,23 @@ +{ lib, fetchFromGitHub, buildDunePackage, ocaml }: + +buildDunePackage { + pname = "landmarks"; + version = "1.4"; + minimalOCamlVersion = "4.08"; + + src = fetchFromGitHub { + owner = "LexiFi"; + repo = "landmarks"; + rev = "b0c753cd2a4c4aa00dffdd3be187d8ed592fabf7"; + hash = "sha256-Wpr76JURUFrj7v39rdM/2Lr7boa7nL/bnPEz1vMrmQo"; + }; + + doCheck = lib.versionAtLeast ocaml.version "4.08" + && lib.versionOlder ocaml.version "5.0"; + + meta = with lib; { + description = "A Simple Profiling Library for OCaml"; + maintainers = [ maintainers.kenran ]; + license = licenses.mit; + }; +} diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 50fcac2c0767..be47100086ea 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -930,6 +930,10 @@ let inherit (pkgs) lame; }; + landmarks = callPackage ../development/ocaml-modules/landmarks { }; + + landmarks-ppx = callPackage ../development/ocaml-modules/landmarks-ppx { }; + lastfm = callPackage ../development/ocaml-modules/lastfm { }; lem = callPackage ../development/ocaml-modules/lem { };