gnu: xmonad: Add patch to support dynamic linking.

Fixes <https://bugs.gnu.org/43131>.

* gnu/packages/patches/xmonad-dynamic-linking.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/wm.scm (xmonad)[source]: Use it.
This commit is contained in:
Timothy Sample 2020-09-02 18:05:36 -04:00
parent 4ff0fed778
commit 57983029a9
No known key found for this signature in database
GPG key ID: 2AC6A5EC1C357C59
3 changed files with 19 additions and 1 deletions

View file

@ -1676,6 +1676,7 @@ dist_patch_DATA = \
%D%/packages/patches/xf86-video-voodoo-pcitag.patch \
%D%/packages/patches/xfce4-panel-plugins.patch \
%D%/packages/patches/xfce4-settings-defaults.patch \
%D%/packages/patches/xmonad-dynamic-linking.patch \
%D%/packages/patches/xplanet-1.3.1-cxx11-eof.patch \
%D%/packages/patches/xplanet-1.3.1-libdisplay_DisplayOutput.cpp.patch \
%D%/packages/patches/xplanet-1.3.1-libimage_gif.c.patch \

View file

@ -0,0 +1,16 @@
This patch is required for xmonad to make use of shared libraries.
Without it, xmonad will not work since we do not (by default) use
statically linked Haskell libraries.
diff -ruN xmonad-0.15-a/src/XMonad/Core.hs xmonad-0.15-b/src/XMonad/Core.hs
--- xmonad-0.15-a/src/XMonad/Core.hs 1969-12-31 19:00:00.000000000 -0500
+++ xmonad-0.15-b/src/XMonad/Core.hs 1969-12-31 19:00:00.000000000 -0500
@@ -681,6 +681,8 @@
compileGHC bin dir errHandle =
runProcess "ghc" ["--make"
, "xmonad.hs"
+ , "-dynamic"
+ , "-fPIC"
, "-i"
, "-ilib"
, "-fforce-recomp"

View file

@ -655,7 +655,8 @@ (define-public xmonad
"xmonad-" version ".tar.gz"))
(sha256
(base32
"0a7rh21k9y6g8fwkggxdxjns2grvvsd5hi2ls4klmqz5xvk4hyaa"))))
"0a7rh21k9y6g8fwkggxdxjns2grvvsd5hi2ls4klmqz5xvk4hyaa"))
(patches (search-patches "xmonad-dynamic-linking.patch"))))
(build-system haskell-build-system)
(inputs
`(("ghc-extensible-exceptions" ,ghc-extensible-exceptions)