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-09-08 00:00:00 +01:00
|
|
|
version = "2.9.1";
|
2019-12-18 09:24:00 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/ocaml/dune/releases/download/${version}/dune-${version}.tbz";
|
2021-09-08 00:00:00 +01:00
|
|
|
sha256 = "09lzq04b642iy0ljp59p32lgk3q8iphjh8fkdp69q29l5frgwx5k";
|
2019-12-18 09:24:00 +00:00
|
|
|
};
|
|
|
|
|
2021-08-14 13:00:00 +01:00
|
|
|
nativeBuildInputs = [ ocaml findlib ];
|
|
|
|
strictDeps = true;
|
2019-12-18 09:24:00 +00:00
|
|
|
|
|
|
|
buildFlags = "release";
|
|
|
|
|
|
|
|
dontAddPrefix = true;
|
2021-08-14 13:00:00 +01:00
|
|
|
dontAddStaticConfigureFlags = true;
|
|
|
|
configurePlatforms = [];
|
2019-12-18 09:24:00 +00:00
|
|
|
|
|
|
|
installFlags = [ "PREFIX=${placeholder "out"}" "LIBDIR=$(OCAMLFIND_DESTDIR)" ];
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = "https://dune.build/";
|
|
|
|
description = "A composable build system";
|
2021-09-08 00:00:00 +01:00
|
|
|
changelog = "https://github.com/ocaml/dune/raw/${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;
|
|
|
|
};
|
|
|
|
}
|