1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
;;;; SPDX-License-Identifier: GPL-3.0-or-later
(use-modules ; import these modules
(guix packages) ; provides the (package ...) record and friends
(gnu packages suckless)) ; provides dwm, st, et cetera
(define my-dwm ; create a variable that contains our new package
(package
(inherit dwm) ; it's based off (gnu packages suckless)'s dwm
(name "my-dwm")
(source
(origin ; this record describes how to fetch the source code
(inherit (package-origin dwm))
;; the modules here are accessible inside the snippet
;; (guix build utils) provides procedures like (substitute*) which
;; are useful during builds or in snippets
(modules ((guix build utils)))
(snippet
`(begin
(substitute* "FIlE-TO-MODIFY"
(("GUILE-REGEX-1") "TEXT-TO-REPLACE-IT-WITH")
(("GUILE-REGEX-2") "TEXT-TO-REPLACE-IT-WITH"))))))))
my-dwm