2023-03-08 16:32:21 +00:00
|
|
|
{ lib, stdenv, fetchurl, ocaml, findlib, darwin, ocaml-lsp }:
|
2022-02-20 05:27:41 +00:00
|
|
|
|
|
|
|
if lib.versionOlder ocaml.version "4.08"
|
|
|
|
then throw "dune 3 is not available for OCaml ${ocaml.version}"
|
|
|
|
else
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "dune";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "3.12.1";
|
2022-02-20 05:27:41 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2022-06-26 10:26:21 +00:00
|
|
|
url = "https://github.com/ocaml/dune/releases/download/${version}/dune-${version}.tbz";
|
2024-01-02 11:29:13 +00:00
|
|
|
hash = "sha256-uf1lYIefnTQK6Kh8lnsNK808QSDP/Nn7Zh8yUHj3T28=";
|
2022-02-20 05:27:41 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ ocaml findlib ];
|
|
|
|
|
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [
|
2023-03-08 16:32:21 +00:00
|
|
|
darwin.apple_sdk.frameworks.CoreServices
|
2022-02-20 05:27:41 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
strictDeps = true;
|
|
|
|
|
2022-10-30 15:09:59 +00:00
|
|
|
buildFlags = [ "release" ];
|
2022-02-20 05:27:41 +00:00
|
|
|
|
|
|
|
dontAddPrefix = true;
|
|
|
|
dontAddStaticConfigureFlags = true;
|
|
|
|
configurePlatforms = [];
|
|
|
|
|
|
|
|
installFlags = [ "PREFIX=${placeholder "out"}" "LIBDIR=$(OCAMLFIND_DESTDIR)" ];
|
|
|
|
|
2023-03-08 16:32:21 +00:00
|
|
|
passthru.tests = {
|
|
|
|
inherit ocaml-lsp;
|
|
|
|
};
|
|
|
|
|
2022-02-20 05:27:41 +00:00
|
|
|
meta = {
|
|
|
|
homepage = "https://dune.build/";
|
|
|
|
description = "A composable build system";
|
|
|
|
changelog = "https://github.com/ocaml/dune/raw/${version}/CHANGES.md";
|
|
|
|
maintainers = [ lib.maintainers.vbgl lib.maintainers.marsam ];
|
|
|
|
license = lib.licenses.mit;
|
|
|
|
inherit (ocaml.meta) platforms;
|
|
|
|
};
|
|
|
|
}
|