diff --git a/pkgs/development/libraries/webkitgtk/default.nix b/pkgs/development/libraries/webkitgtk/default.nix index 8348aff49d55..e042326ba5ff 100644 --- a/pkgs/development/libraries/webkitgtk/default.nix +++ b/pkgs/development/libraries/webkitgtk/default.nix @@ -103,7 +103,16 @@ clangStdenv.mkDerivation (finalAttrs: { hash = "sha256-z0B2ocoqZHiO3KjEUtjrto1eKWXliP5Go4igFlE+3OQ="; }; - patches = lib.optionals clangStdenv.hostPlatform.isLinux [ + patches = [ + # Fix build with system malloc + # See: https://bugs.webkit.org/show_bug.cgi?id=316083 + (fetchpatch { + url = "https://github.com/WebKit/WebKit/commit/a6bc685a685c8f16c919dc6310a62a26971d396e.patch"; + hash = "sha256-X3E9SYykYomoBeAL4vS1Iuw2fPdO8fI7MvAW/kEhTMc="; + name = "fix-build-with-system-malloc.patch"; + }) + ] + ++ lib.optionals clangStdenv.hostPlatform.isLinux [ (replaceVars ./fix-bubblewrap-paths.patch { inherit (builtins) storeDir; inherit (addDriverRunpath) driverLink;