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";
|
2022-02-10 20:34:41 +00:00
|
|
|
version = "2.9.3";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2022-01-26 04:04:25 +00:00
|
|
|
url = "https://github.com/ocaml/dune/releases/download/${version}/dune-site-${version}.tbz";
|
2022-02-10 20:34:41 +00:00
|
|
|
sha256 = "sha256:1ml8bxym8sdfz25bx947al7cvsi2zg5lcv7x9w6xb01cmdryqr9y";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
nativeBuildInputs = [ ocaml findlib ];
|
|
|
|
strictDeps = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-10-30 15:09:59 +00:00
|
|
|
buildFlags = [ "release" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
dontAddPrefix = true;
|
2021-09-18 10:52:07 +00:00
|
|
|
dontAddStaticConfigureFlags = true;
|
|
|
|
configurePlatforms = [];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
installFlags = [ "PREFIX=${placeholder "out"}" "LIBDIR=$(OCAMLFIND_DESTDIR)" ];
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = "https://dune.build/";
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Composable build system";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "dune";
|
2021-09-18 10:52:07 +00:00
|
|
|
changelog = "https://github.com/ocaml/dune/raw/${version}/CHANGES.md";
|
2024-05-15 15:35:15 +00:00
|
|
|
maintainers = [ lib.maintainers.vbgl ];
|
2021-02-05 17:12:51 +00:00
|
|
|
license = lib.licenses.mit;
|
2020-04-24 23:36:52 +00:00
|
|
|
inherit (ocaml.meta) platforms;
|
|
|
|
};
|
|
|
|
}
|