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