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"
|
2020-04-24 23:36:52 +00:00
|
|
|
then throw "dune is not available for OCaml ${ocaml.version}"
|
|
|
|
else
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "dune";
|
2021-04-05 15:23:46 +00:00
|
|
|
version = "2.8.5";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/ocaml/dune/releases/download/${version}/dune-${version}.tbz";
|
2021-04-05 15:23:46 +00:00
|
|
|
sha256 = "0a9n8ilsi3kyx5xqvk5s7iikk6y3pkpm5mvsn5za5ivlzf1i40br";
|
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;
|
|
|
|
};
|
|
|
|
}
|