2021-01-23 12:26:19 +00:00
|
|
|
{ lib, stdenv, fetchurl, ocaml, findlib }:
|
2019-12-18 09:24:00 +00:00
|
|
|
|
2021-01-23 12:26:19 +00:00
|
|
|
if lib.versionOlder ocaml.version "4.08"
|
2021-05-19 10:51:35 +01:00
|
|
|
then throw "dune 2 is not available for OCaml ${ocaml.version}"
|
2019-12-18 09:24:00 +00:00
|
|
|
else
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "dune";
|
2021-03-29 10:20:00 +01:00
|
|
|
version = "2.8.5";
|
2019-12-18 09:24:00 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/ocaml/dune/releases/download/${version}/dune-${version}.tbz";
|
2021-03-29 10:20:00 +01:00
|
|
|
sha256 = "0a9n8ilsi3kyx5xqvk5s7iikk6y3pkpm5mvsn5za5ivlzf1i40br";
|
2019-12-18 09:24:00 +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-01-21 04:20:00 +00:00
|
|
|
changelog = "https://github.com/ocaml/dune/blob/${version}/CHANGES.md";
|
2021-01-23 12:26:19 +00:00
|
|
|
maintainers = [ lib.maintainers.vbgl lib.maintainers.marsam ];
|
|
|
|
license = lib.licenses.mit;
|
2019-12-18 09:24:00 +00:00
|
|
|
inherit (ocaml.meta) platforms;
|
|
|
|
};
|
|
|
|
}
|