summary refs log tree commit diff
path: root/pkgs/development/libraries/jemalloc/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/libraries/jemalloc/default.nix')
-rw-r--r--pkgs/development/libraries/jemalloc/default.nix9
1 files changed, 9 insertions, 0 deletions
diff --git a/pkgs/development/libraries/jemalloc/default.nix b/pkgs/development/libraries/jemalloc/default.nix
index cb734508b34..c505dc6db55 100644
--- a/pkgs/development/libraries/jemalloc/default.nix
+++ b/pkgs/development/libraries/jemalloc/default.nix
@@ -1,6 +1,7 @@
 { lib
 , stdenv
 , fetchurl
+, fetchpatch
 # By default, jemalloc puts a je_ prefix onto all its symbols on OSX, which
 # then stops downstream builds (mariadb in particular) from detecting it. This
 # option should remove the prefix and give us a working jemalloc.
@@ -19,6 +20,14 @@ stdenv.mkDerivation rec {
     sha256 = "sha256-LbgtHnEZ3z5xt2QCGbbf6EeJvAU3mDw7esT3GJrs/qo=";
   };
 
+  patches = [
+    # fix tests under --with-jemalloc-prefix=, see https://github.com/jemalloc/jemalloc/pull/2340
+    (fetchpatch {
+      url = "https://github.com/jemalloc/jemalloc/commit/d00ecee6a8dfa90afcb1bbc0858985c17bef6559.patch";
+      hash = "sha256-N5i4IxGJ4SSAgFiq5oGRnrNeegdk2flw9Sh2mP0yl4c=";
+    })
+  ];
+
   # see the comment on stripPrefix
   configureFlags = []
     ++ lib.optional stripPrefix "--with-jemalloc-prefix="