about summary refs log tree commit diff
path: root/pkgs/applications/science/logic
diff options
context:
space:
mode:
authorSergei Trofimovich <slyich@gmail.com>2024-02-09 22:59:09 +0000
committerSergei Trofimovich <slyich@gmail.com>2024-02-11 19:47:22 +0000
commit016be1d8b30166a4b4d8e2f6864f1575be74fe0e (patch)
tree2672f1d582dddb62a888be02b123d4fa2091d164 /pkgs/applications/science/logic
parent442d407992384ed9c0e6d352de75b69079904e4e (diff)
downloadnixlib-016be1d8b30166a4b4d8e2f6864f1575be74fe0e.tar
nixlib-016be1d8b30166a4b4d8e2f6864f1575be74fe0e.tar.gz
nixlib-016be1d8b30166a4b4d8e2f6864f1575be74fe0e.tar.bz2
nixlib-016be1d8b30166a4b4d8e2f6864f1575be74fe0e.tar.lz
nixlib-016be1d8b30166a4b4d8e2f6864f1575be74fe0e.tar.xz
nixlib-016be1d8b30166a4b4d8e2f6864f1575be74fe0e.tar.zst
nixlib-016be1d8b30166a4b4d8e2f6864f1575be74fe0e.zip
lean3: fix `gcc-13` build failure)
Without the change the build fails on `master` as https://hydra.nixos.org/build/247665202:

    /build/source/src/shell/lean_js.h:11:32: error: 'uintptr_t' was not declared in this scope
       11 | int emscripten_process_request(uintptr_t msg);
          |                                ^~~~~~~~~
Diffstat (limited to 'pkgs/applications/science/logic')
-rw-r--r--pkgs/applications/science/logic/lean/default.nix11
1 files changed, 10 insertions, 1 deletions
diff --git a/pkgs/applications/science/logic/lean/default.nix b/pkgs/applications/science/logic/lean/default.nix
index d96bf665f2eb..f0bd2ba777db 100644
--- a/pkgs/applications/science/logic/lean/default.nix
+++ b/pkgs/applications/science/logic/lean/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchFromGitHub, cmake, gmp, coreutils }:
+{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake, gmp, coreutils }:
 
 stdenv.mkDerivation rec {
   pname = "lean";
@@ -15,6 +15,15 @@ stdenv.mkDerivation rec {
     hash   = "sha256-Vcsph4dTNLafeaTtVwJS8tWoWCgcP6pxF0ssZDE/YfM=";
   };
 
+  patches = [
+    # Fix gcc-13 build failure
+    (fetchpatch {
+      name = "gcc-13.patch";
+      url = "https://github.com/leanprover-community/lean/commit/21d264a66d53b0a910178ae7d9529cb5886a39b6.patch";
+      hash = "sha256-hBm2QNFS1jdoR6LUQHLReKxMKv7kbkrkrTGJ43YnvfA=";
+    })
+  ];
+
   nativeBuildInputs = [ cmake ];
   buildInputs = [ gmp ];