diff options
author | Théo Zimmermann <theo.zimmermann@inria.fr> | 2022-07-06 19:15:34 +0200 |
---|---|---|
committer | Vincent Laporte <vbgl@users.noreply.github.com> | 2022-07-08 14:54:04 +0200 |
commit | 1014f00cff4d2ce2057f4103b1433e9441460446 (patch) | |
tree | 6a4dc045d71401b575af8c36a4fde53f53e1aee2 /pkgs/applications/science/logic/coq | |
parent | 0898779c3944d6ca9d90abb9641d4030796fdaa2 (diff) |
Prepare Coq derivation for Coq 8.17 build infrastructure.
Diffstat (limited to 'pkgs/applications/science/logic/coq')
-rw-r--r-- | pkgs/applications/science/logic/coq/default.nix | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/pkgs/applications/science/logic/coq/default.nix b/pkgs/applications/science/logic/coq/default.nix index bb92e2d749227..5e516ca56385e 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 |