2022-09-22 12:36:57 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, fetchpatch, ocaml, findlib, ncurses, cmdliner_1_0, re }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "ocaml${ocaml.version}-ocp-build";
|
|
|
|
version = "1.99.21";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "OCamlPro";
|
|
|
|
repo = "ocp-build";
|
2020-11-03 02:18:15 +00:00
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "1641xzik98c7xnjwxpacijd6d9jzx340fmdn6i372z8h554jjlg9";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-05-03 20:48:10 +00:00
|
|
|
patches = [
|
|
|
|
# Fix compilation with OCaml 4.12
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/OCamlPro/ocp-build/commit/104e4656ca6dba9edb03b62539c9f1e10abcaae8.patch";
|
|
|
|
sha256 = "0sbyi4acig9q8x1ky4hckfg5pm2nad6zasi51ravaf1spgl148c2";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2023-02-09 11:40:11 +00:00
|
|
|
strictDeps = true;
|
|
|
|
|
|
|
|
nativeBuildInputs = [ ocaml findlib ];
|
|
|
|
buildInputs = [ cmdliner_1_0 re ];
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [ ncurses ];
|
|
|
|
preInstall = "mkdir -p $out/bin";
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A build tool for OCaml";
|
|
|
|
longDescription = ''
|
|
|
|
ocp-build is a build system for OCaml application, based on simple
|
|
|
|
descriptions of packages. ocp-build combines the descriptions of
|
|
|
|
packages, and optimize the parallel compilation of files depending on
|
|
|
|
the number of cores and the automatically-inferred dependencies
|
|
|
|
between source files.
|
|
|
|
'';
|
2022-06-16 17:23:12 +00:00
|
|
|
homepage = "https://www.typerex.org/ocp-build.html";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.gpl3;
|
|
|
|
maintainers = [ maintainers.jirkamarsik ];
|
2022-06-16 17:23:12 +00:00
|
|
|
mainProgram = "ocp-build";
|
|
|
|
inherit (ocaml.meta) platforms;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|