File tree Expand file tree Collapse file tree 1 file changed +21
-4
lines changed
Expand file tree Collapse file tree 1 file changed +21
-4
lines changed Original file line number Diff line number Diff line change 22 lib ,
33 stdenv ,
44 fetchurl ,
5+ fetchpatch ,
56 bzip2 ,
67} :
78
@@ -18,13 +19,29 @@ stdenv.mkDerivation rec {
1819 sha256 = "1rnvgcdixjzbrmcr1nv9b6ccrjfrhryaj7jwz28yxxv6lam3xlcg" ;
1920 } ;
2021
21- buildInputs = [ bzip2 ] ;
22+ patches = [
23+ # https://libcxx.llvm.org/ReleaseNotes/19.html#deprecations-and-removals
24+ # https://bugs.launchpad.net/pbzip2/+bug/2081588
25+ ( fetchpatch {
26+ url = "https://github.com/freebsd/freebsd-ports/raw/974d3ff054965d2bd2ab884a0579ed06c5a08b07/archivers/pbzip2/files/patch-BZ2StreamScanner.cpp" ;
27+ extraPrefix = "" ;
28+ hash = "sha256-dvXdp+5S41akavy+mvPGHpUxHxenXS7bbTVBVkIJj0s=" ;
29+ } )
30+ ( fetchpatch {
31+ url = "https://github.com/freebsd/freebsd-ports/raw/974d3ff054965d2bd2ab884a0579ed06c5a08b07/archivers/pbzip2/files/patch-BZ2StreamScanner.h" ;
32+ extraPrefix = "" ;
33+ hash = "sha256-/twP8HyHP4cAVgb5cUPq0CgDxUgDYPdd9haH9wDOrz8=" ;
34+ } )
35+ ] ;
2236
23- preBuild = "substituteInPlace Makefile --replace g++ c++" ;
37+ postPatch = ''
38+ substituteInPlace pbzip2.cpp \
39+ --replace-fail '"PRIuMAX"' '" PRIuMAX "'
40+ '' ;
2441
25- installFlags = [ "PREFIX=$(out)" ] ;
42+ buildInputs = [ bzip2 ] ;
2643
27- env . NIX_CFLAGS_COMPILE = lib . optionalString stdenv . cc . isClang "-Wno-error=reserved-user-defined-literal" ;
44+ installFlags = [ "PREFIX=$(out)" ] ;
2845
2946 meta = with lib ; {
3047 homepage = "http://compression.ca/pbzip2/" ;
You can’t perform that action at this time.
0 commit comments