mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-08-26 02:05:02 +00:00
coq: fix compilation following https://github.com/rocq-prover/rocq/pull/22327
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user