@@ -42,6 +42,12 @@ stdenv.mkDerivation rec {
4242 sha256 = "000d50yzyysbr9ldhvnbpzn35vplqm08dnmh55wc5zk273gy383f";
4343 };
4444
45+ # Configure script searches for a symbol which does not exist in jemalloc on Darwin
46+ # Reported upstream in https://github.com/tatsuhiro-t/nghttp2/issues/233
47+ postPatch = if (stdenv.isDarwin && optJemalloc != null) then ''
48+ substituteInPlace configure --replace "malloc_stats_print" "je_malloc_stats_print"
49+ '' else null;
50+
4551 nativeBuildInputs = [ pkgconfig ];
4652 buildInputs = [ optJansson optBoost optLibxml2 optJemalloc ]
4753 ++ stdenv.lib.optionals hasApp [ optOpenssl optLibev optZlib ];