This commit is contained in:
Pierre Roux
2026-08-19 16:37:31 +02:00
parent 2ac2ee8370
commit 56d6b47ef0

View File

@@ -307,7 +307,10 @@ let
+ ''
ln -s $out/lib/coq${suffix} $OCAMLFIND_DESTDIR/coq${suffix}
''
+ lib.optionalString (coqAtLeast "8.14") ''
+ lib.optionalString (coqAtLeast "9.4") ''
ln -s $out/lib/rocqide-server $OCAMLFIND_DESTDIR/rocqide-server
''
+ lib.optionalString (coqAtLeast "8.14" && !coqAtLeast "9.4") ''
ln -s $out/lib/coqide-server $OCAMLFIND_DESTDIR/coqide-server
''
+ lib.optionalString buildIde ''
@@ -340,6 +343,7 @@ let
strictDeps = true;
__structuredAttrs = true;
};
coqrocqide-server = if coqAtLeast "9.4" then "rocqide-server" else "coqide-server";
in
if coqAtLeast "8.21" then
self.overrideAttrs (o: {
@@ -352,12 +356,12 @@ if coqAtLeast "8.21" then
];
buildPhase = ''
runHook preBuild
dune build -p coq-core,coqide-server${lib.optionalString buildIde ",rocqide"} -j $NIX_BUILD_CORES
dune build -p coq-core,${coqrocqide-server}${lib.optionalString buildIde ",rocqide"} -j $NIX_BUILD_CORES
runHook postBuild
'';
installPhase = ''
runHook preInstall
dune install --prefix $out coq-core coqide-server${lib.optionalString buildIde " rocqide"}
dune install --prefix $out coq-core ${coqrocqide-server}${lib.optionalString buildIde " rocqide"}
# coq and rocq are now in different directories, which sometimes confuses coq_makefile
# which expects both in the same /nix/store/.../bin/ directory
# adding symlinks to content it