Prepare Coq derivation for Coq 8.17 build infrastructure.

This commit is contained in:
Théo Zimmermann 2022-07-06 19:15:34 +02:00 committed by Vincent Laporte
parent 0898779c39
commit 1014f00cff

View file

@ -190,8 +190,9 @@ self = stdenv.mkDerivation {
categories = [ "Development" "Science" "Math" "IDE" "GTK" ];
});
postInstall = let suffix = if coqAtLeast "8.14" then "-core" else ""; in ''
postInstall = let suffix = if coqAtLeast "8.14" then "-core" else ""; in optionalString (!coqAtLeast "8.17") ''
cp bin/votour $out/bin/
'' + ''
ln -s $out/lib/coq${suffix} $OCAMLFIND_DESTDIR/coq${suffix}
'' + optionalString (coqAtLeast "8.14") ''
ln -s $out/lib/coqide-server $OCAMLFIND_DESTDIR/coqide-server
@ -215,4 +216,17 @@ self = stdenv.mkDerivation {
platforms = platforms.unix;
mainProgram = "coqide";
};
}; in self
}; in
if coqAtLeast "8.17" then self.overrideAttrs(_: {
buildPhase = ''
runHook preBuild
make dunestrap
dune build -p coq-core,coq-stdlib,coq,coqide-server${if buildIde then ",coqide" else ""} -j $NIX_BUILD_CORES
runHook postBuild
'';
installPhase = ''
runHook preInstall
dune install --prefix $out coq-core coq-stdlib coq coqide-server${if buildIde then " coqide" else ""}
runHook postInstall
'';
}) else self