2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchurl, ocaml, findlib }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
if lib.versionOlder ocaml.version "4.08"
|
2021-05-20 23:08:51 +00:00
|
|
|
then throw "dune 2 is not available for OCaml ${ocaml.version}"
|
2020-04-24 23:36:52 +00:00
|
|
|
else
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "dune";
|
2021-07-03 03:11:41 +00:00
|
|
|
version = "2.9.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/ocaml/dune/releases/download/${version}/dune-${version}.tbz";
|
2021-07-03 03:11:41 +00:00
|
|
|
sha256 = "07m476kgagpd6kzm3jq30yfxqspr2hychah0xfqs14z82zxpq8dv";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ ocaml findlib ];
|
|
|
|
|
|
|
|
buildFlags = "release";
|
|
|
|
|
|
|
|
dontAddPrefix = true;
|
|
|
|
|
|
|
|
installFlags = [ "PREFIX=${placeholder "out"}" "LIBDIR=$(OCAMLFIND_DESTDIR)" ];
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = "https://dune.build/";
|
|
|
|
description = "A composable build system";
|
2021-02-05 17:12:51 +00:00
|
|
|
changelog = "https://github.com/ocaml/dune/blob/${version}/CHANGES.md";
|
|
|
|
maintainers = [ lib.maintainers.vbgl lib.maintainers.marsam ];
|
|
|
|
license = lib.licenses.mit;
|
2020-04-24 23:36:52 +00:00
|
|
|
inherit (ocaml.meta) platforms;
|
|
|
|
};
|
|
|
|
}
|