From 424326cc04b0e1e75f01cd015b6f6a924ec2b9cb Mon Sep 17 00:00:00 2001 From: Luis Guilherme Coelho Date: Sun, 29 Sep 2024 22:11:59 -0300 Subject: [PATCH] packages: wm: Add xmonad --- radix/packages/wm.scm | 44 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/radix/packages/wm.scm b/radix/packages/wm.scm index 3503e70..428de77 100644 --- a/radix/packages/wm.scm +++ b/radix/packages/wm.scm @@ -2,6 +2,8 @@ #:use-module (gnu packages freedesktop) #:use-module (gnu packages guile) #:use-module (gnu packages guile-xyz) + #:use-module (gnu packages haskell-check) + #:use-module (gnu packages haskell-xyz) #:use-module (gnu packages linux) #:use-module (gnu packages pkg-config) #:use-module (gnu packages wm) @@ -9,7 +11,9 @@ #:use-module (gnu packages zig-xyz) #:use-module (gnu packages) #:use-module (guix build-system gnu) + #:use-module (guix build-system haskell) #:use-module (guix build-system zig) + #:use-module (guix download) #:use-module (guix gexp) #:use-module (guix git-download) #:use-module (guix packages) @@ -147,3 +151,43 @@ which case the previously focused tags are focused again.") (native-inputs (modify-inputs (package-native-inputs river) (delete "libxkbcommon"))))) + +(define-public xmonad + (package + (name "xmonad") + (version "0.18.0") + (source + (origin + (method url-fetch) + (uri (hackage-uri "xmonad" version)) + (sha256 + (base32 "1ysxxjkkx2l160nlj1h8ysxrfhxjlmbws2nm0wyiivmjgn20xs11")))) + (build-system haskell-build-system) + (properties '((upstream-name . "xmonad"))) + (arguments + (list #:phases + #~(modify-phases %standard-phases + (add-after 'install 'install-xsession + (lambda _ + (let ((xsessions (string-append #$output "/share/xsessions"))) + (mkdir-p xsessions) + (make-desktop-entry-file + (string-append xsessions "/xmonad.desktop") + #:name "xmonad" + #:comment "xmonad window manager" + #:type "Application" + #:exec (string-append #$output "/bin/xmonad")))))))) + (inputs (list ghc-x11 ghc-data-default-class ghc-setlocale)) + (native-inputs (list ghc-quickcheck ghc-quickcheck-classes)) + (home-page "http://xmonad.org") + (synopsis "Tiling window manager") + (description + "Xmonad is a tiling window manager for X. Windows are arranged +automatically to tile the screen without gaps or overlap, maximising screen +use. All features of the window manager are accessible from the keyboard: a +mouse is strictly optional. Xmonad is written and extensible in Haskell. +Custom layout algorithms, and other extensions, may be written by the user in +config files. Layouts are applied dynamically, and different layouts may be +used on each workspace. Xinerama is fully supported, allowing windows to be +tiled on several screens.") + (license license:bsd-3)))