dune: let dune install itself
This commit is contained in:
parent
223474d8ac
commit
f3704de649
|
@ -1,4 +1,4 @@
|
||||||
{ stdenv, fetchurl, ocaml, findlib, opaline }:
|
{ stdenv, fetchurl, ocaml, findlib }:
|
||||||
|
|
||||||
if !stdenv.lib.versionAtLeast ocaml.version "4.02"
|
if !stdenv.lib.versionAtLeast ocaml.version "4.02"
|
||||||
then throw "dune is not available for OCaml ${ocaml.version}"
|
then throw "dune is not available for OCaml ${ocaml.version}"
|
||||||
|
@ -15,15 +15,13 @@ stdenv.mkDerivation rec {
|
||||||
buildInputs = [ ocaml findlib ];
|
buildInputs = [ ocaml findlib ];
|
||||||
|
|
||||||
buildFlags = [ "release" ];
|
buildFlags = [ "release" ];
|
||||||
|
makeFlags = [
|
||||||
|
"PREFIX=${placeholder "out"}"
|
||||||
|
"LIBDIR=$(OCAMLFIND_DESTDIR)"
|
||||||
|
];
|
||||||
|
|
||||||
dontAddPrefix = true;
|
dontAddPrefix = true;
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
runHook preInstall
|
|
||||||
${opaline}/bin/opaline -prefix $out -libdir $OCAMLFIND_DESTDIR
|
|
||||||
runHook postInstall
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
homepage = "https://dune.build/";
|
homepage = "https://dune.build/";
|
||||||
description = "A composable build system";
|
description = "A composable build system";
|
||||||
|
|
Loading…
Reference in New Issue