2021-01-12 19:05:53 +00:00
|
|
|
{ stdenv, lib, fetchurl, ocaml, findlib }:
|
2017-03-10 20:13:56 +00:00
|
|
|
|
2021-01-12 19:05:53 +00:00
|
|
|
if !lib.versionAtLeast ocaml.version "4.02"
|
2019-07-23 20:26:00 +01:00
|
|
|
then throw "dune is not available for OCaml ${ocaml.version}"
|
|
|
|
else
|
|
|
|
|
2018-02-22 04:06:07 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-07-05 13:28:06 +01:00
|
|
|
pname = "dune";
|
2019-10-11 06:00:00 +01:00
|
|
|
version = "1.11.4";
|
2018-09-25 14:40:02 +01:00
|
|
|
src = fetchurl {
|
2019-07-20 03:29:24 +01:00
|
|
|
url = "https://github.com/ocaml/dune/releases/download/${version}/dune-build-info-${version}.tbz";
|
2019-10-11 06:00:00 +01:00
|
|
|
sha256 = "1rkc8lqw30ifjaz8d81la6i8j05ffd0whpxqsbg6dci16945zjvp";
|
2017-03-10 20:13:56 +00:00
|
|
|
};
|
|
|
|
|
2019-03-20 10:28:28 +00:00
|
|
|
buildInputs = [ ocaml findlib ];
|
2017-03-10 20:13:56 +00:00
|
|
|
|
2019-10-27 13:03:25 +00:00
|
|
|
buildFlags = [ "release" ];
|
2021-01-08 16:25:54 +00:00
|
|
|
makeFlags = [
|
|
|
|
"PREFIX=${placeholder "out"}"
|
|
|
|
"LIBDIR=$(OCAMLFIND_DESTDIR)"
|
|
|
|
];
|
2018-09-25 14:40:02 +01:00
|
|
|
|
2018-04-30 10:52:30 +01:00
|
|
|
dontAddPrefix = true;
|
|
|
|
|
2021-01-12 19:05:53 +00:00
|
|
|
meta = with lib; {
|
2019-07-05 13:28:06 +01:00
|
|
|
homepage = "https://dune.build/";
|
2018-09-25 14:40:02 +01:00
|
|
|
description = "A composable build system";
|
2021-01-12 19:05:53 +00:00
|
|
|
maintainers = [ maintainers.vbgl maintainers.marsam ];
|
|
|
|
license = licenses.mit;
|
2019-03-20 10:28:28 +00:00
|
|
|
inherit (ocaml.meta) platforms;
|
2017-03-10 20:13:56 +00:00
|
|
|
};
|
|
|
|
}
|