From b33f01b7cc533fb71fead70fd6ea05789a01053d Mon Sep 17 00:00:00 2001 From: Yuri Albuquerque Date: Sat, 21 Dec 2024 19:10:45 -0300 Subject: [PATCH 1/2] ocamlPackages.ocamlformat-mlx-lib: init at 0.26.2.0 --- .../ocaml-modules/ocamlformat-mlx/lib.nix | 70 +++++++++++++++++++ pkgs/top-level/ocaml-packages.nix | 4 ++ 2 files changed, 74 insertions(+) create mode 100644 pkgs/development/ocaml-modules/ocamlformat-mlx/lib.nix diff --git a/pkgs/development/ocaml-modules/ocamlformat-mlx/lib.nix b/pkgs/development/ocaml-modules/ocamlformat-mlx/lib.nix new file mode 100644 index 0000000000000..7b2f4626b18e3 --- /dev/null +++ b/pkgs/development/ocaml-modules/ocamlformat-mlx/lib.nix @@ -0,0 +1,70 @@ +{ + lib, + buildDunePackage, + fetchFromGitHub, + menhir, + alcotest, + base, + dune-build-info, + either, + fix, + fpath, + menhirLib, + menhirSdk, + ocaml-version, + ocamlformat-rpc-lib, + ocp-indent, + stdio, + uuseg, + csexp, + astring, + result, + camlp-streams, + odoc, +}: +buildDunePackage rec { + pname = "ocamlformat-mlx-lib"; + version = "0.26.2.0"; + minimalOcamlVersion = "4.08"; + + src = fetchFromGitHub { + owner = "ocaml-mlx"; + repo = "ocamlformat-mlx"; + rev = version; + hash = "sha256-I9ZP8Ory/CRFbHUCe5NkZKKYMwtL1gl8xw965k5R718="; + }; + + propagatedBuildInputs = [ + alcotest + base + dune-build-info + either + fix + fpath + menhirLib + menhirSdk + ocaml-version + ocamlformat-rpc-lib + ocp-indent + stdio + uuseg + csexp + astring + result + camlp-streams + odoc + ]; + + nativeBuildInputs = [ + menhir + ]; + + meta = { + homepage = "https://github.com/ocaml-mlx/ocamlformat-mlx"; + description = "OCaml .mlx Code Formatter"; + maintainers = with lib.maintainers; [ + Denommus + ]; + license = lib.licenses.mit; + }; +} diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 1eb7e48874fd4..990fb8888e777 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -1349,6 +1349,10 @@ let ocamlformat-lib = callPackage ../development/ocaml-modules/ocamlformat/ocamlformat-lib.nix { }; + ocamlformat-mlx = callPackage ../development/ocaml-modules/ocamlformat-mlx/ocamlformat-mlx.nix { }; + + ocamlformat-mlx-lib = callPackage ../development/ocaml-modules/ocamlformat-mlx/lib.nix { }; + ocamlformat-rpc-lib = callPackage ../development/ocaml-modules/ocamlformat/ocamlformat-rpc-lib.nix { }; ocamlfuse = callPackage ../development/ocaml-modules/ocamlfuse { }; From b6b5cedf0f500b4125f50839091c9c8b03ff600b Mon Sep 17 00:00:00 2001 From: Yuri Albuquerque Date: Sat, 21 Dec 2024 19:27:04 -0300 Subject: [PATCH 2/2] ocamlPackages.ocamlformat-mlx: init at 0.26.2.0 --- .../ocaml-modules/ocamlformat-mlx/default.nix | 22 +++++++++++++++++++ pkgs/top-level/ocaml-packages.nix | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 pkgs/development/ocaml-modules/ocamlformat-mlx/default.nix diff --git a/pkgs/development/ocaml-modules/ocamlformat-mlx/default.nix b/pkgs/development/ocaml-modules/ocamlformat-mlx/default.nix new file mode 100644 index 0000000000000..a198a7a36f6b4 --- /dev/null +++ b/pkgs/development/ocaml-modules/ocamlformat-mlx/default.nix @@ -0,0 +1,22 @@ +{ + lib, + buildDunePackage, + fetchFromGitHub, + cmdliner, + odoc, + ocamlformat-mlx-lib, + re, +}: +buildDunePackage rec { + pname = "ocamlformat-mlx"; + minimalOcamlVersion = "4.08"; + + inherit (ocamlformat-mlx-lib) version src meta; + + buildInputs = [ + cmdliner + re + odoc + ocamlformat-mlx-lib + ]; +} diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 990fb8888e777..bdb87c70e090b 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -1349,7 +1349,7 @@ let ocamlformat-lib = callPackage ../development/ocaml-modules/ocamlformat/ocamlformat-lib.nix { }; - ocamlformat-mlx = callPackage ../development/ocaml-modules/ocamlformat-mlx/ocamlformat-mlx.nix { }; + ocamlformat-mlx = callPackage ../development/ocaml-modules/ocamlformat-mlx { }; ocamlformat-mlx-lib = callPackage ../development/ocaml-modules/ocamlformat-mlx/lib.nix { };