2018-11-05 10:21:46 +00:00
|
|
|
{ stdenv, fetchFromGitHub, ocamlPackages }:
|
2018-10-22 11:03:33 +01:00
|
|
|
|
2018-11-05 10:21:46 +00:00
|
|
|
with ocamlPackages; buildDunePackage rec {
|
2018-10-22 11:03:33 +01:00
|
|
|
pname = "ocamlformat";
|
2018-11-05 10:21:46 +00:00
|
|
|
version = "0.8";
|
|
|
|
|
|
|
|
minimumOCamlVersion = "4.05";
|
2018-10-22 11:03:33 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ocaml-ppx";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
|
|
|
sha256 = "1i7rsbs00p43362yv7z7dw0qsnv7vjf630qk676qvfg7kg422w6j";
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
base
|
|
|
|
cmdliner
|
|
|
|
fpath
|
|
|
|
ocaml-migrate-parsetree
|
|
|
|
stdio
|
|
|
|
];
|
|
|
|
|
|
|
|
configurePhase = ''
|
|
|
|
patchShebangs tools/gen_version.sh
|
|
|
|
tools/gen_version.sh src/Version.ml version
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
2018-11-05 10:21:46 +00:00
|
|
|
inherit (src.meta) homepage;
|
2018-10-22 11:03:33 +01:00
|
|
|
description = "Auto-formatter for OCaml code";
|
|
|
|
maintainers = [ stdenv.lib.maintainers.Zimmi48 ];
|
|
|
|
license = stdenv.lib.licenses.mit;
|
|
|
|
};
|
|
|
|
}
|