2021-09-18 10:52:07 +00:00
|
|
|
{ stdenv, lib, fetchurl, ocaml, findlib, ncurses }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
if lib.versionOlder ocaml.version "4.02"
|
2021-03-09 03:18:52 +00:00
|
|
|
|| lib.versionAtLeast ocaml.version "4.12"
|
2021-05-20 23:08:51 +00:00
|
|
|
then throw "dune 1 is not available for OCaml ${ocaml.version}"
|
2020-04-24 23:36:52 +00:00
|
|
|
else
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "dune";
|
|
|
|
version = "1.11.4";
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/ocaml/dune/releases/download/${version}/dune-build-info-${version}.tbz";
|
|
|
|
sha256 = "1rkc8lqw30ifjaz8d81la6i8j05ffd0whpxqsbg6dci16945zjvp";
|
|
|
|
};
|
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
nativeBuildInputs = [ ocaml findlib ];
|
|
|
|
buildInputs = [ ncurses ];
|
|
|
|
strictDeps = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildFlags = [ "release" ];
|
2021-02-05 17:12:51 +00:00
|
|
|
makeFlags = [
|
|
|
|
"PREFIX=${placeholder "out"}"
|
|
|
|
"LIBDIR=$(OCAMLFIND_DESTDIR)"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
dontAddPrefix = true;
|
2021-09-18 10:52:07 +00:00
|
|
|
dontAddStaticConfigureFlags = true;
|
|
|
|
configurePlatforms = [];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://dune.build/";
|
|
|
|
description = "A composable build system";
|
2021-02-05 17:12:51 +00:00
|
|
|
maintainers = [ maintainers.vbgl maintainers.marsam ];
|
|
|
|
license = licenses.mit;
|
2020-04-24 23:36:52 +00:00
|
|
|
inherit (ocaml.meta) platforms;
|
|
|
|
};
|
|
|
|
}
|