haskell-xmonad-contrib: patch to fix build with ghc 8.4.x

+110
+3
pkgs/development/haskell-modules/configuration-ghc-8.4.x.nix
··· 674 674 sha256 = "1mj3k0w8aqyy71kmc71vzhgxmr4h6i5b3sykwflzays50grjm5jp"; 675 675 })) self.semigroups; 676 676 677 + # https://github.com/xmonad/xmonad-contrib/issues/235 678 + xmonad-contrib = doJailbreak (appendPatch super.xmonad-contrib ./patches/xmonad-contrib-ghc-8.4.1-fix.patch); 679 + 677 680 }
+107
pkgs/development/haskell-modules/patches/xmonad-contrib-ghc-8.4.1-fix.patch
··· 1 + From 86595e193e8d46c769ab2a1cee961e8e04dfd1b9 Mon Sep 17 00:00:00 2001 2 + From: Michiel Derhaeg <derhaeg.michiel@gmail.com> 3 + Date: Tue, 20 Mar 2018 22:06:18 +0100 4 + Subject: [PATCH] update to work with GHC 8.4.1 5 + 6 + --- 7 + XMonad/Hooks/FadeWindows.hs | 6 +++++- 8 + XMonad/Hooks/WallpaperSetter.hs | 6 +++++- 9 + XMonad/Layout/Mosaic.hs | 6 +++++- 10 + xmonad-contrib.cabal | 5 +++-- 11 + 5 files changed, 33 insertions(+), 5 deletions(-) 12 + 13 + diff --git a/XMonad/Hooks/FadeWindows.hs b/XMonad/Hooks/FadeWindows.hs 14 + index 4b8e62b6..01d06792 100644 15 + --- a/XMonad/Hooks/FadeWindows.hs 16 + +++ b/XMonad/Hooks/FadeWindows.hs 17 + @@ -61,7 +61,8 @@ import Control.Monad.Reader (ask 18 + ,asks) 19 + import Control.Monad.State (gets) 20 + import qualified Data.Map as M 21 + -import Data.Monoid 22 + +import Data.Monoid hiding ((<>)) 23 + +import Data.Semigroup 24 + 25 + import Graphics.X11.Xlib.Extras (Event(..)) 26 + 27 + @@ -134,6 +135,9 @@ instance Monoid Opacity where 28 + r `mappend` OEmpty = r 29 + _ `mappend` r = r 30 + 31 + +instance Semigroup Opacity where 32 + + (<>) = mappend 33 + + 34 + -- | A FadeHook is similar to a ManageHook, but records window opacity. 35 + type FadeHook = Query Opacity 36 + 37 + diff --git a/XMonad/Hooks/WallpaperSetter.hs b/XMonad/Hooks/WallpaperSetter.hs 38 + index 00a3b1c3..d4f5ccb2 100644 39 + --- a/XMonad/Hooks/WallpaperSetter.hs 40 + +++ b/XMonad/Hooks/WallpaperSetter.hs 41 + @@ -41,7 +41,8 @@ import Data.Ord (comparing) 42 + import Control.Monad 43 + import Control.Applicative 44 + import Data.Maybe 45 + -import Data.Monoid 46 + +import Data.Monoid hiding ((<>)) 47 + +import Data.Semigroup 48 + 49 + -- $usage 50 + -- This module requires imagemagick and feh to be installed, as these are utilized 51 + @@ -86,6 +87,9 @@ instance Monoid WallpaperList where 52 + mappend (WallpaperList w1) (WallpaperList w2) = 53 + WallpaperList $ M.toList $ (M.fromList w2) `M.union` (M.fromList w1) 54 + 55 + +instance Semigroup WallpaperList where 56 + + (<>) = mappend 57 + + 58 + -- | Complete wallpaper configuration passed to the hook 59 + data WallpaperConf = WallpaperConf { 60 + wallpaperBaseDir :: FilePath -- ^ Where the wallpapers reside (if empty, will look in \~\/.wallpapers/) 61 + diff --git a/XMonad/Layout/Mosaic.hs b/XMonad/Layout/Mosaic.hs 62 + index 05655d4c..da44fc50 100644 63 + --- a/XMonad/Layout/Mosaic.hs 64 + +++ b/XMonad/Layout/Mosaic.hs 65 + @@ -38,7 +38,8 @@ import Control.Monad(mplus) 66 + import Data.Foldable(Foldable,foldMap, sum) 67 + import Data.Function(on) 68 + import Data.List(sortBy) 69 + -import Data.Monoid(Monoid,mempty, mappend) 70 + +import Data.Monoid(Monoid,mempty, mappend, (<>)) 71 + +import Data.Semigroup 72 + 73 + 74 + -- $usage 75 + @@ -202,6 +203,9 @@ instance Monoid (Tree a) where 76 + mappend x Empty = x 77 + mappend x y = Branch x y 78 + 79 + +instance Semigroup (Tree a) where 80 + + (<>) = mappend 81 + + 82 + makeTree :: (Num a1, Ord a1) => (a -> a1) -> [a] -> Tree a 83 + makeTree _ [] = Empty 84 + makeTree _ [x] = Leaf x 85 + diff --git a/xmonad-contrib.cabal b/xmonad-contrib.cabal 86 + index dde3ccda..c401c6e6 100644 87 + --- a/xmonad-contrib.cabal 88 + +++ b/xmonad-contrib.cabal 89 + @@ -36,7 +36,7 @@ cabal-version: >= 1.6 90 + build-type: Simple 91 + bug-reports: https://github.com/xmonad/xmonad-contrib/issues 92 + 93 + -tested-with: GHC==7.6.3, GHC==7.8.4, GHC==7.10.3, GHC==8.0.1 94 + +tested-with: GHC==7.6.3, GHC==7.8.4, GHC==7.10.3, GHC==8.0.1, GHC==8.2.2, GHC==8.4.1 95 + 96 + source-repository head 97 + type: git 98 + @@ -66,7 +66,8 @@ library 99 + unix, 100 + X11>=1.6.1 && < 1.9, 101 + xmonad>=0.13 && < 0.14, 102 + - utf8-string 103 + + utf8-string, 104 + + semigroups 105 + 106 + if flag(use_xft) 107 + build-depends: X11-xft >= 0.2