guix-channel/rg/packages/suckless.scm

70 lines
2.6 KiB
Scheme

(define-module (rg packages suckless)
#:use-module (guix download)
#:use-module (guix packages)
#:use-module (guix utils)
#:use-module (gnu packages)
#:use-module (gnu packages fontutils)
#:use-module (gnu packages suckless)
#:use-module (gnu packages xorg)
#:use-module (rg packages xorg))
(define-public st-custom
(package
(inherit st)
(name "st-custom")
(version (package-version st))
(source
(origin
(method url-fetch)
(uri (string-append "https://dl.suckless.org/st/st-"
version ".tar.gz"))
(sha256
(base32 "0dxb8ksy4rcnhp5k54p7i7wwhm64ksmavf5wh90zfbyh7qh34s7a"))
(patches
(list
;; Enables scrolling using Shift+{PageUp,PageDown}.
(origin
(method url-fetch)
(uri (string-append "https://st.suckless.org/patches/scrollback/"
"st-scrollback-20201205-4ef0cbd.diff"))
(file-name "st-scrollback.patch")
(sha256
(base32 "1d1gyfbn4slsnl9paviajlwa7mf7wijvpxh0w6ibyb1m2lc7v31v")))
;; Enables scrolling using Shift+MouseWheel.
(origin
(method url-fetch)
(uri (string-append "https://st.suckless.org/patches/scrollback/"
"st-scrollback-mouse-20191024-a2c479c.diff"))
(file-name "st-scrollback-mouse.patch")
(sha256
(base32 "0z961sv4pxa1sxrbhalqzz2ldl7qb26qk9l11zx1hp8rh3cmi51i")))
;; Disables scrolling using mouse wheel, when in MODE_ALTSCREEN.
(origin
(method url-fetch)
(uri (string-append "https://st.suckless.org/patches/scrollback/"
"st-scrollback-mouse-altscreen-20200416-5703aa0.diff"))
(file-name "st-scrollback-mouse-altscreen.patch")
(sha256
(base32 "17avl5bgwlh5ayaqfg01sg9klf828hc0fd36cgzldnl595jyp1yb")))))))
(arguments
(substitute-keyword-arguments (package-arguments st)
((#:phases phases)
`(modify-phases ,phases
(add-after 'unpack 'patch
(lambda _
;; Rename the config file, so that the changes
;; are picked up by build script.
(rename-file "config.def.h" "config.h")
(substitute* "config.h"
;; Change font from Liberation to Noto.
;; Use size instead of pixel size.
(("Liberation Mono:pixelsize=12")
"Noto Mono:size=10"))))))))
(inputs
(list
fontconfig
freetype
libx11
libxft-custom))))