From 5877d74f03f8164af91850d439d7cc584c006d6e Mon Sep 17 00:00:00 2001
From: Nikolay Amiantov <ab@fmap.me>
Date: Tue, 13 Oct 2015 15:14:24 +0300
Subject: [PATCH] rxvt_unicode: add patch to fix Shift+PgUp/PgDown bug

---
 pkgs/applications/misc/rxvt_unicode/default.nix | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/pkgs/applications/misc/rxvt_unicode/default.nix b/pkgs/applications/misc/rxvt_unicode/default.nix
index c1d74c247cef..325a42b70b15 100644
--- a/pkgs/applications/misc/rxvt_unicode/default.nix
+++ b/pkgs/applications/misc/rxvt_unicode/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, perlSupport, libX11, libXt, libXft, ncurses, perl,
+{ stdenv, fetchurl, fetchpatch, perlSupport, libX11, libXt, libXft, ncurses, perl,
   fontconfig, freetype, pkgconfig, libXrender, gdkPixbufSupport, gdk_pixbuf,
   unicode3Support }:
 
@@ -28,6 +28,10 @@ stdenv.mkDerivation (rec {
   patches = [
     ./rxvt-unicode-9.06-font-width.patch
     ./rxvt-unicode-256-color-resources.patch
+    (fetchpatch {
+      url = "https://raw.githubusercontent.com/mina86/urxvt-tabbedex/ad4f54c8b8d3a01fc17975fd3fd14aa674c07d2b/rxvt-unicode-scroll-bug-fix.patch";
+      sha256 = "1ild0r6y7jb800yiss5pgd4k60s7l9njv3nn3x280yvg1lx6ihpg";
+    })
   ]
   ++ stdenv.lib.optional stdenv.isDarwin ./rxvt-unicode-makefile-phony.patch;