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