# Pastebin Xg6pG8ij pkgs.foo.overrideAttrs (old: { patches = old.patches or [] ++ [(pkgs.fetchurl { url = "https://github.com/owner/repo/pull/1.patch"; sha256 = "..."; })]; })