diff --git a/pkgs/applications/science/logic/coq/default.nix b/pkgs/applications/science/logic/coq/default.nix index bb92e2d74922..5e516ca56385 100644 --- a/pkgs/applications/science/logic/coq/default.nix +++ b/pkgs/applications/science/logic/coq/default.nix @@ -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