nixpkgs/pkgs/development/tools/ocaml/dune/default.nix

35 lines
918 B
Nix
Raw Normal View History

2019-03-20 10:28:28 +00:00
{ stdenv, fetchurl, ocaml, findlib, opaline }:
2019-07-23 20:26:00 +01:00
if !stdenv.lib.versionAtLeast ocaml.version "4.02"
then throw "dune is not available for OCaml ${ocaml.version}"
else
2018-02-22 04:06:07 +00:00
stdenv.mkDerivation rec {
pname = "dune";
2019-08-23 01:10:42 +01:00
version = "1.11.3";
2018-09-25 14:40:02 +01:00
src = fetchurl {
2019-07-20 03:29:24 +01:00
url = "https://github.com/ocaml/dune/releases/download/${version}/dune-build-info-${version}.tbz";
2019-08-23 01:10:42 +01:00
sha256 = "1lmvsis6dk8mccbwpypz9qdxr134gjhdwshxw6q12mi4x3kn6fn8";
};
2019-03-20 10:28:28 +00:00
buildInputs = [ ocaml findlib ];
2018-09-25 14:40:02 +01:00
buildFlags = "release";
2018-04-30 10:52:30 +01:00
dontAddPrefix = true;
installPhase = ''
runHook preInstall
${opaline}/bin/opaline -prefix $out -libdir $OCAMLFIND_DESTDIR
runHook postInstall
'';
meta = {
homepage = "https://dune.build/";
2018-09-25 14:40:02 +01:00
description = "A composable build system";
2019-08-23 01:12:39 +01:00
maintainers = [ stdenv.lib.maintainers.vbgl stdenv.lib.maintainers.marsam ];
2018-09-25 14:40:02 +01:00
license = stdenv.lib.licenses.mit;
2019-03-20 10:28:28 +00:00
inherit (ocaml.meta) platforms;
};
}