From 016be1d8b30166a4b4d8e2f6864f1575be74fe0e Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Fri, 9 Feb 2024 22:59:09 +0000 Subject: 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); | ^~~~~~~~~ --- pkgs/applications/science/logic/lean/default.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'pkgs/applications/science/logic') 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 ]; -- cgit 1.4.1