lol
1{
2 lib,
3 stdenv,
4 fetchurl,
5 ocaml,
6 findlib,
7 ocaml-lsp,
8 dune-release,
9}:
10
11if lib.versionOlder ocaml.version "4.08" then
12 throw "dune 3 is not available for OCaml ${ocaml.version}"
13else
14
15 stdenv.mkDerivation rec {
16 pname = "dune";
17 version = "3.20.2";
18
19 src = fetchurl {
20 url = "https://github.com/ocaml/dune/releases/download/${version}/dune-${version}.tbz";
21 hash = "sha256-sahrLWC9tKi5u2hhvfL58opufLXYM86Br+zOue+cpUk=";
22 };
23
24 nativeBuildInputs = [
25 ocaml
26 findlib
27 ];
28
29 strictDeps = true;
30
31 buildFlags = [ "release" ];
32
33 dontAddPrefix = true;
34 dontAddStaticConfigureFlags = true;
35 configurePlatforms = [ ];
36
37 installFlags = [
38 "PREFIX=${placeholder "out"}"
39 "LIBDIR=$(OCAMLFIND_DESTDIR)"
40 ];
41
42 passthru.tests = {
43 inherit ocaml-lsp dune-release;
44 };
45
46 meta = {
47 homepage = "https://dune.build/";
48 description = "Composable build system";
49 mainProgram = "dune";
50 changelog = "https://github.com/ocaml/dune/raw/${version}/CHANGES.md";
51 maintainers = [ lib.maintainers.vbgl ];
52 license = lib.licenses.mit;
53 inherit (ocaml.meta) platforms;
54 };
55 }