From 2c63059067e34a3609e9ddf078f2ddc9270e87e4 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Mon, 19 Feb 2024 22:15:49 +0000 Subject: [PATCH] nano-wallet: fix `gcc-13` build failure Without the change the build fails on `master` as https://hydra.nixos.org/build/249086772: In file included from /build/source/submodules/rocksdb/table/block_based/data_block_hash_index.cc:9: /build/source/submodules/rocksdb/table/block_based/data_block_hash_index.h:65:7: error: 'uint8_t' does not name a type 65 | const uint8_t kNoEntry = 255; | ^~~~~~~ --- .../blockchains/nano-wallet/default.nix | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/blockchains/nano-wallet/default.nix b/pkgs/applications/blockchains/nano-wallet/default.nix index aa5222a50e7e..0dc6db9e5d7f 100644 --- a/pkgs/applications/blockchains/nano-wallet/default.nix +++ b/pkgs/applications/blockchains/nano-wallet/default.nix @@ -1,4 +1,6 @@ -{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, wrapQtAppsHook, boost, libGL +{ lib, stdenv, fetchFromGitHub +, fetchpatch +, cmake, pkg-config, wrapQtAppsHook, boost, libGL , qtbase, python3 }: stdenv.mkDerivation rec { @@ -14,6 +16,17 @@ stdenv.mkDerivation rec { hash = "sha256-YvYEXHC8kxviZLQwINs+pS61wITSfqfrrPmlR+zNRoE="; }; + patches = [ + # Fix gcc-13 build failure due to missing includes. + (fetchpatch { + name = "gcc-13.patch"; + url = "https://github.com/facebook/rocksdb/commit/88edfbfb5e1cac228f7cc31fbec24bb637fe54b1.patch"; + stripLen = 1; + extraPrefix = "submodules/rocksdb/"; + hash = "sha256-HhlIYyPzIZFuyzHTUPz3bXgXiaFSQ8pVrLLMzegjTgE="; + }) + ]; + cmakeFlags = let options = { PYTHON_EXECUTABLE = "${python3.interpreter}";