guix-channel

A channel for the Guix package manager

git clone https://git.8pit.net/guix-channel.git

  1(define-module (nmeum packages desktop)
  2  #:use-module (guix)
  3  #:use-module (guix gexp)
  4  #:use-module (guix git-download)
  5  #:use-module (guix build-system gnu)
  6  #:use-module (guix build-system zig)
  7  #:use-module ((guix licenses) #:prefix license:)
  8  #:use-module (gnu packages)
  9  #:use-module (gnu packages audio)
 10  #:use-module (gnu packages fonts)
 11  #:use-module (gnu packages zig)
 12  #:use-module (gnu packages zig-xyz)
 13  #:use-module (gnu packages freedesktop)
 14  #:use-module (gnu packages linux)
 15  #:use-module (gnu packages xdisorg)
 16  #:use-module (gnu packages pkg-config)
 17  #:use-module (gnu packages fontutils)
 18  #:use-module (gnu packages textutils))
 19
 20(define-public creek
 21  (package
 22    (name "creek")
 23    (version "0.4.2")
 24    (source
 25     (origin
 26       (method git-fetch)
 27       (uri (git-reference
 28             (url "https://github.com/nmeum/creek")
 29             (commit (string-append "v" version))
 30             (recursive? #t)))
 31       (file-name (git-file-name name version))
 32       (sha256
 33        (base32 "0b1gpxgi207cqrls6qp0pd6749g60yfcrjii8nagm00c678bs3nx"))))
 34    (build-system zig-build-system)
 35    (arguments
 36     (list
 37      #:zig-release-type "safe"
 38      #:tests? #f))
 39    (native-inputs (list fcft
 40                         pixman
 41                         pkg-config
 42                         zig-wayland
 43                         zig-fcft
 44                         zig-pixman))
 45    (home-page "https://github.com/nmeum/leeve")
 46    (synopsis
 47     "A minimalistic and malleable status bar for the River compositor.")
 48    (description "A fork of the creek status bar which intended to be
 49more mallable then the original version.  For example,
 50supporting custom status bar information via stdin.")
 51    (license license:expat)))
 52
 53(define-public dam
 54  (let ((commit "e6eb713fb3239aad3c534502d8c0e42e4e514c8f")
 55        (revision "1"))
 56    (package
 57      (name "dam")
 58      (version (git-version "0" revision commit))
 59      (source
 60       (origin
 61         (method git-fetch)
 62         (uri (git-reference
 63               (url "https://codeberg.org/sewn/dam")
 64               (commit commit)))
 65         (file-name (git-file-name name version))
 66         (sha256
 67          (base32 "0ybhyvv3n1xdy5hb1xw7l2rzy73n5vhh8r60gfbf61crhggnzh8k"))))
 68      (build-system gnu-build-system)
 69      (arguments
 70       (list
 71        #:tests? #f
 72        #:make-flags #~(list (string-append "PREFIX=" #$output))
 73        #:phases #~(modify-phases %standard-phases
 74                     (add-before 'configure 'set-cc-command
 75                       (lambda _
 76                         (setenv "CC" #$(cc-for-target))))
 77                     (delete 'configure))))
 78      (inputs (list fcft pixman wayland wayland-protocols))
 79      (native-inputs (list pkg-config))
 80      (home-page "https://codeberg.org/sewn/dam")
 81      (synopsis "A itsy-bitsy dwm-esque bar for the river compositor")
 82      (description "")
 83      (license license:expat))))
 84
 85(define-public dumb-runtime-dir
 86  (package
 87    (name "dumb-runtime-dir")
 88    (version "1.0.4")
 89    (source
 90     (origin
 91       (method git-fetch)
 92       (uri (git-reference
 93             (url "https://github.com/ifreund/dumb_runtime_dir")
 94             (commit (string-append "v" version))))
 95       (file-name (git-file-name name version))
 96       (sha256
 97        (base32 "0nrxhvbh3bs4pi4f5h03zw1p1ys19qmmlx263ysly8302wkxk1m4"))))
 98    (build-system gnu-build-system)
 99    (arguments
100     (list
101      #:tests? #f
102      #:make-flags #~(list (string-append "CC="
103                                          #$(cc-for-target))
104                           (string-append "PREFIX=")
105                           (string-append "DESTDIR="
106                                          #$output))
107      #:phases #~(modify-phases %standard-phases
108                   (delete 'configure))))
109    (inputs (list linux-pam))
110    (native-inputs (list pkg-config))
111    (home-page "https://github.com/ifreund/dumb_runtime_dir")
112    (synopsis "Creates an XDG_RUNTIME_DIR via PAM")
113    (description
114     "Provides a acronym{PAM, Pluggable Authentication Module} for
115creating a primitve @code{XDG_RUNTIME_DIR} that is never removed.  This
116is useful in conjuction with simple seat managers like @code{seatd}
117which do not set @code{XDG_RUNTIME_DIR}.")
118    (license license:bsd-0)))
119
120(define-public font-terminus-patched
121  (package
122    (inherit font-terminus)
123    (name "font-terminus-patched")
124    (arguments
125     (substitute-keyword-arguments (package-arguments font-terminus)
126       ((#:phases phases
127         '%standard-phases)
128        #~(modify-phases #$phases
129            (add-after 'unpack 'patch-font
130              (lambda _
131                (invoke "patch" "-p0" "-i" "alt/td1.diff")
132                (invoke "patch" "-p0" "-i" "alt/ll2.diff")))))))))
133
134(define-public ustatus
135  (let ((commit "4032e2010de049472b7af57e85b7e4728fdde5e7")
136        (revision "0"))
137    (package
138      (name "ustatus")
139      (version (git-version "20190721" revision commit))
140      (source
141       (origin
142         (method git-fetch)
143         (uri (git-reference
144               (url "https://github.com/nmeum/ustatus")
145               (commit commit)))
146         (file-name (git-file-name name version))
147         (sha256
148          (base32 "0a9pf51c2j68s7limdhw8ccqhyc1lk3q0iddfh1y65m18jh1vmn1"))))
149      (build-system gnu-build-system)
150      (arguments
151       (list
152        #:tests? #f
153        #:make-flags
154        #~(list (string-append "CC="
155                               #$(cc-for-target)))
156        #:phases
157        #~(modify-phases %standard-phases
158            (replace 'configure
159              (lambda _
160                (with-output-to-file "config.h"
161                  (lambda _
162                    (display
163                     "static const int delay = 5;
164                     static const char *statsep = \" | \";
165                     static const char *timefmt = \"%a %d %b -- %H:%M:%S\";
166                     static const char *sysbat = \"/sys/class/power_supply/BAT0\";
167                     static const char *syscur = \"charge_now\";
168                     static const char *sysfull = \"charge_full_design\";
169                     static const unsigned int sndcrd = 0;
170                     static const char* swtchname = \"Master Playback Switch\";
171                     static const char* volumname = \"Master Playback Volume\";
172
173                     static size_t batcapmay(char *dest, size_t n) {
174                       size_t ret;
175                       static int hasbat = -1;
176
177                       if (hasbat == -1) {
178                         if (access(sysbat, F_OK)) {
179                           hasbat = 0;
180                           return 0;
181                         }
182                         hasbat = 1;
183                       } else if (!hasbat) {
184                         return 0;
185                       }
186
187                       ret = batcap(dest, n);
188                       if (ret)
189                         ret += separator(&dest[ret], n - ret);
190
191                       return ret;
192                     }
193
194                     static size_t (* const sfuncs[])(char*, size_t) = {
195                       batcapmay,
196                       loadavg,
197                       separator,
198                       curtime,
199                     };
200                     ")))))
201            (replace 'install
202              (lambda* (#:key outputs #:allow-other-keys)
203                (let* ((outdir (assoc-ref outputs "out"))
204                       (bindir (string-append outdir "/bin")))
205                  (mkdir-p bindir)
206                  (copy-file "ustatus"
207                             (string-append bindir "/ustatus"))))))))
208      (inputs (list tinyalsa))
209      (native-inputs (list pkg-config))
210      (home-page "https://git.8pit.net/ustatus")
211      (synopsis "Minimal status tool for dwm-like status bars")
212      (description "")
213      (license license:wtfpl2))))
214
215(define-public zig-fcft
216  (package
217    (name "zig-fcft")
218    (version "1.1.0")
219    (source
220     (origin
221       (method git-fetch)
222       (uri (git-reference
223             (url "https://git.sr.ht/~novakane/zig-fcft")
224             (commit version)))
225       (file-name (git-file-name name version))
226       (sha256
227        (base32 "0im0rdwww7xxvhmibfp3459h8wwdmihjb9m7vmzxkgqs4x77l114"))))
228    (build-system zig-build-system)
229    (arguments
230     (list
231      #:skip-build? #t
232      #:tests? #f))
233    (propagated-inputs (list zig-pixman fcft))
234    (native-inputs (list pkg-config))
235    (synopsis "Zig bindings for the fcft font library")
236    (description "")
237    (home-page "https://git.sr.ht/~novakane/zig-fcft")
238    (license license:expat)))