nixpkgs/pkgs/development/ocaml-modules/ocamlformat/ocamlformat.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

34 lines
808 B
Nix
Raw Normal View History

2023-08-07 15:08:52 +00:00
{ lib
, callPackage
, buildDunePackage
, re
, ocamlformat-lib
, menhir
, version ? "0.26.0"
}:
let inherit (callPackage ./generic.nix { inherit version; }) src library_deps;
2020-10-14 14:19:25 +00:00
in buildDunePackage {
2020-10-14 14:19:25 +00:00
pname = "ocamlformat";
inherit src version;
2023-03-29 04:31:56 +00:00
minimalOCamlVersion = "4.08";
duneVersion = "3";
nativeBuildInputs =
if lib.versionAtLeast version "0.25.1" then [ ] else [ menhir ];
buildInputs = [ re ] ++ library_deps
++ lib.optionals (lib.versionAtLeast version "0.25.1")
[ (ocamlformat-lib.override { inherit version; }) ];
2020-10-14 14:19:25 +00:00
meta = {
homepage = "https://github.com/ocaml-ppx/ocamlformat";
description = "Auto-formatter for OCaml code";
2023-04-20 09:37:52 +00:00
maintainers = with lib.maintainers; [ Zimmi48 marsam Julow ];
2020-10-14 14:19:25 +00:00
license = lib.licenses.mit;
2023-08-07 15:08:52 +00:00
mainProgram = "ocamlformat";
2020-10-14 14:19:25 +00:00
};
}