1
1
args @
2
- { stdenv , fetchFromGitHub ? null , pkg-config , autoreconfHook , db48 , boost , zeromq
2
+ { stdenv , fetchFromGitHub ? null , fetchpatch , pkg-config , autoreconfHook , db48 , boost , zeromq
3
3
, zlib , miniupnpc , qtbase ? null , qttools ? null , util-linux ? null , hexdump ? null , protobuf , python3 , qrencode , libevent
4
4
, lcov ? null
5
5
, lib , writeText
14
14
, qaAssetsDir ? null
15
15
, unitTestDataDir ? if qaAssetsDir != null then "${ qaAssetsDir } /unit_test_data" else null
16
16
, fuzzSeedCorpusDir ? if qaAssetsDir != null then "${ qaAssetsDir } /fuzz_seed_corpus" else null
17
+ , withGCC13Patches ? true
17
18
} :
18
19
19
20
assert withFuzz -> stdenv . cc . isClang ;
@@ -33,7 +34,19 @@ stdenv.mkDerivation rec {
33
34
sha256 = "sha256-UNjYkEZBjGuhkwBxSkNXjBBcLQqoan/afCLhoR2lOY4=" ;
34
35
} ;
35
36
36
- patches = [ ./elements-lcov.patch ] ;
37
+ patches = optionals withCoverage [ ./elements-lcov.patch ]
38
+ ++ optionals withGCC13Patches [
39
+ ( fetchpatch {
40
+ name = "Add-missing-includes-to-fix-gcc-13-compile-error.patch" ;
41
+ url = "https://github.com/bitcoin/bitcoin/commit/398768769f85cc1b6ff212ed931646b59fa1acd6.patch" ;
42
+ hash = "sha256-4nnE4W0Z5HzVaJ6tB8QmyohXmt6UHUGgDH+s9bQaxhg=" ;
43
+ } )
44
+ ( fetchpatch {
45
+ name = "23-x-Add-missing-includes-to-fix-gcc-13-compile-error.patch" ;
46
+ url = "https://github.com/bitcoin/bitcoin/commit/af862661654966d5de614755ab9bd1b5913e0959.patch" ;
47
+ hash = "sha256-4hcJIje3VAdEEpn2tetgvgZ8nVft+A64bfWLspQtbVw=" ;
48
+ } )
49
+ ] ;
37
50
38
51
postPatch = optionals ( doCheck )
39
52
''
0 commit comments