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