Gentoo patches

Relevant pieces of patches from gentoo haskell overlay: https://github.com/gentoo-haskell/gentoo-haskell/tree/master/app-editors/yi/files