From caf4d7bb6f231dfa1b08ef39e6d1cff461a4f386 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sat, 24 Feb 2024 18:04:08 +0000 Subject: [PATCH] vertcoin: fix `gcc-13` build Without the change the build fails on `master` as https://hydra.nixos.org/build/249126465: support/lockedpool.cpp: In member function 'void Arena::free(void*)': support/lockedpool.cpp:102:20: error: 'runtime_error' is not a member of 'std' 102 | throw std::runtime_error("Arena: invalid or double free"); | ^~~~~~~~~~~~~ --- .../applications/blockchains/vertcoin/default.nix | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/pkgs/applications/blockchains/vertcoin/default.nix b/pkgs/applications/blockchains/vertcoin/default.nix index 90e4dd14a685..097b5711da32 100644 --- a/pkgs/applications/blockchains/vertcoin/default.nix +++ b/pkgs/applications/blockchains/vertcoin/default.nix @@ -1,5 +1,6 @@ { lib, stdenv , fetchFromGitHub +, fetchpatch , openssl , boost , libevent @@ -29,6 +30,20 @@ stdenv.mkDerivation rec { sha256 = "ua9xXA+UQHGVpCZL0srX58DDUgpfNa+AAIKsxZbhvMk="; }; + patches = [ + # Fix build on gcc-13 due to missing headers + (fetchpatch { + name = "gcc-13-p1.patch"; + url = "https://github.com/vertcoin-project/vertcoin-core/commit/398768769f85cc1b6ff212ed931646b59fa1acd6.patch"; + hash = "sha256-4nnE4W0Z5HzVaJ6tB8QmyohXmt6UHUGgDH+s9bQaxhg="; + }) + (fetchpatch { + name = "gcc-13-p2.patch"; + url = "https://github.com/vertcoin-project/vertcoin-core/commit/af862661654966d5de614755ab9bd1b5913e0959.patch"; + hash = "sha256-4hcJIje3VAdEEpn2tetgvgZ8nVft+A64bfWLspQtbVw="; + }) + ]; + nativeBuildInputs = [ autoreconfHook pkg-config