diff --git a/pkgs/development/ocaml-modules/cmon/default.nix b/pkgs/development/ocaml-modules/cmon/default.nix new file mode 100644 index 000000000000..3edc0bb5e226 --- /dev/null +++ b/pkgs/development/ocaml-modules/cmon/default.nix @@ -0,0 +1,30 @@ +{ + lib, + fetchurl, + buildDunePackage, + grenier, + pprint, +}: + +buildDunePackage (finalAttrs: { + pname = "cmon"; + version = "0.2"; + + src = fetchurl { + url = "https://github.com/let-def/cmon/releases/download/v${finalAttrs.version}/cmon-${finalAttrs.version}.tbz"; + hash = "sha256-lJi5NV27YqyDgUx1i4vBj/buzyzdWJSrSceGGs82grg="; + }; + + propagatedBuildInputs = [ + grenier + pprint + ]; + + doCheck = true; + + meta = { + description = "A library for printing OCaml values with sharing"; + license = lib.licenses.mit; + homepage = "https://github.com/let-def/cmon"; + }; +}) diff --git a/pkgs/development/ocaml-modules/grenier/default.nix b/pkgs/development/ocaml-modules/grenier/default.nix new file mode 100644 index 000000000000..88f50619d7c6 --- /dev/null +++ b/pkgs/development/ocaml-modules/grenier/default.nix @@ -0,0 +1,22 @@ +{ + lib, + fetchurl, + buildDunePackage, +}: + +buildDunePackage (finalAttrs: { + pname = "grenier"; + version = "0.16"; + src = fetchurl { + url = "https://github.com/let-def/grenier/releases/download/v${finalAttrs.version}/grenier-${finalAttrs.version}.tbz"; + hash = "sha256-j9Iqv59FicIGAIZU+p7rsc9KWHN+uzQTjGcJUg82t18="; + }; + + doCheck = true; + + meta = { + description = "A collection of various algorithms in OCaml"; + license = lib.licenses.isc; + homepage = "https://github.com/let-def/grenier"; + }; +}) diff --git a/pkgs/development/ocaml-modules/lrgrep/default.nix b/pkgs/development/ocaml-modules/lrgrep/default.nix new file mode 100644 index 000000000000..7a51a78d623f --- /dev/null +++ b/pkgs/development/ocaml-modules/lrgrep/default.nix @@ -0,0 +1,37 @@ +{ + lib, + fetchurl, + buildDunePackage, + menhir, + cmon, + menhirLib, + menhirSdk, +}: + +buildDunePackage (finalAttrs: { + pname = "lrgrep"; + version = "0.9"; + + minimalOCamlVersion = "4.14"; + + src = fetchurl { + url = "https://github.com/let-def/lrgrep/releases/download/v${finalAttrs.version}/lrgrep-${finalAttrs.version}.tbz"; + hash = "sha256-5T3hLkxcvmvKAGQ1kyZrT5+i4/ahOBle7/ekMp9cHHU="; + }; + + nativeBuildInputs = [ menhir ]; + + propagatedBuildInputs = [ + cmon + menhirLib + menhirSdk + ]; + + doCheck = true; + + meta = { + license = lib.licenses.isc; + description = "Detailed error messages for Menhir-generated parsers"; + homepage = "https://github.com/let-def/lrgrep"; + }; +}) diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 9191c658132e..7e85b77a462a 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -275,6 +275,8 @@ let cmdliner_1 = cmdliner.override { version = "1.3.0"; }; + cmon = callPackage ../development/ocaml-modules/cmon { }; + cohttp = callPackage ../development/ocaml-modules/cohttp { }; cohttp_5_3 = cohttp.overrideAttrs (_: { @@ -800,6 +802,8 @@ let graphql_ppx = callPackage ../development/ocaml-modules/graphql_ppx { }; + grenier = callPackage ../development/ocaml-modules/grenier { }; + gsl = callPackage ../development/ocaml-modules/gsl { inherit (pkgs) gsl; }; @@ -1163,6 +1167,8 @@ let lreplay = callPackage ../development/ocaml-modules/lreplay { }; + lrgrep = callPackage ../development/ocaml-modules/lrgrep { }; + lru = callPackage ../development/ocaml-modules/lru { }; lsp = callPackage ../development/ocaml-modules/ocaml-lsp/lsp.nix { };