diff options
Diffstat (limited to 'nixpkgs/pkgs/development/tools/ocaml/dune/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/tools/ocaml/dune/default.nix | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/tools/ocaml/dune/default.nix b/nixpkgs/pkgs/development/tools/ocaml/dune/default.nix new file mode 100644 index 000000000000..ef0f5c4fabd4 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/ocaml/dune/default.nix @@ -0,0 +1,34 @@ +{ stdenv, fetchurl, ocaml, findlib, opaline }: + +if !stdenv.lib.versionAtLeast ocaml.version "4.02" +then throw "dune is not available for OCaml ${ocaml.version}" +else + +stdenv.mkDerivation rec { + pname = "dune"; + version = "1.11.4"; + src = fetchurl { + url = "https://github.com/ocaml/dune/releases/download/${version}/dune-build-info-${version}.tbz"; + sha256 = "1rkc8lqw30ifjaz8d81la6i8j05ffd0whpxqsbg6dci16945zjvp"; + }; + + buildInputs = [ ocaml findlib ]; + + buildFlags = [ "release" ]; + + dontAddPrefix = true; + + installPhase = '' + runHook preInstall + ${opaline}/bin/opaline -prefix $out -libdir $OCAMLFIND_DESTDIR + runHook postInstall + ''; + + meta = { + homepage = "https://dune.build/"; + description = "A composable build system"; + maintainers = [ stdenv.lib.maintainers.vbgl stdenv.lib.maintainers.marsam ]; + license = stdenv.lib.licenses.mit; + inherit (ocaml.meta) platforms; + }; +} |