1d3d1d367f45c9ae35ca4e5d3c8651b0f2b44374
[jackhill/guix/guix.git] / gnu / packages / suckless.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
3 ;;; Copyright © 2015 Amirouche Boubekki <amirouche@hypermove.net>
4 ;;; Copyright © 2016 Al McElrath <hello@yrns.org>
5 ;;; Copyright © 2016, 2017 ng0 <ng0@no-reply.pragmatique.xyz>
6 ;;; Copyright © 2015 Dmitry Bogatov <KAction@gnu.org>
7 ;;; Copyright © 2015 Leo Famulari <leo@famulari.name>
8 ;;; Copyright © 2016 Eric Bavier <bavier@member.fsf.org>
9 ;;; Copyright © 2017 Alex Griffin <a@ajgrf.com>
10 ;;;
11 ;;; This file is part of GNU Guix.
12 ;;;
13 ;;; GNU Guix is free software; you can redistribute it and/or modify it
14 ;;; under the terms of the GNU General Public License as published by
15 ;;; the Free Software Foundation; either version 3 of the License, or (at
16 ;;; your option) any later version.
17 ;;;
18 ;;; GNU Guix is distributed in the hope that it will be useful, but
19 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
20 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 ;;; GNU General Public License for more details.
22 ;;;
23 ;;; You should have received a copy of the GNU General Public License
24 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
25
26 (define-module (gnu packages suckless)
27 #:use-module ((guix licenses) #:prefix license:)
28 #:use-module (guix packages)
29 #:use-module (guix download)
30 #:use-module (guix git-download)
31 #:use-module (guix build-system gnu)
32 #:use-module (guix build-system glib-or-gtk)
33 #:use-module (gnu packages)
34 #:use-module (gnu packages gnome)
35 #:use-module (gnu packages image)
36 #:use-module (gnu packages xorg)
37 #:use-module (gnu packages fonts)
38 #:use-module (gnu packages pkg-config)
39 #:use-module (gnu packages webkit)
40 #:use-module (gnu packages fontutils)
41 #:use-module (gnu packages mpd)
42 #:use-module (gnu packages linux)
43 #:use-module (gnu packages compression)
44 #:use-module (gnu packages cups)
45 #:use-module (gnu packages ncurses)
46 #:use-module (gnu packages gawk)
47 #:use-module (gnu packages base)
48 #:use-module (gnu packages libbsd))
49
50 (define-public blind
51 (package
52 (name "blind")
53 (version "1.0")
54 (source (origin
55 (method url-fetch)
56 (uri (string-append "http://dl.suckless.org/tools/blind-"
57 version ".tar.gz"))
58 (sha256
59 (base32
60 "1b36k8fg2gmabm69jckqja49i8y4rcbccgvv2wija15ciszrm1x9"))))
61 (build-system gnu-build-system)
62 (arguments
63 '(#:tests? #f ; no check target
64 #:make-flags (list
65 "CC=gcc"
66 (string-append "PREFIX=" %output))
67 #:phases
68 (modify-phases %standard-phases
69 (delete 'configure)))) ; no configure script
70 (synopsis "Command line video editing utilities")
71 (home-page "http://tools.suckless.org/blind/")
72 (description
73 "Blind is a collection of command line video editing utilities. It uses
74 a custom raw video format with a simple container.")
75 (license license:isc)))
76
77 (define-public dwm
78 (package
79 (name "dwm")
80 (version "6.1")
81 (source (origin
82 (method url-fetch)
83 (uri (string-append "http://dl.suckless.org/dwm/dwm-"
84 version ".tar.gz"))
85 (sha256
86 (base32 "1zkmwb6df6m254shx06ly90c0q4jl70skk1pvkixpb7hcxhwbxn2"))))
87 (build-system gnu-build-system)
88 (arguments
89 `(#:tests? #f
90 #:make-flags (list (string-append "FREETYPEINC="
91 (assoc-ref %build-inputs "freetype")
92 "/include/freetype2"))
93 #:phases
94 (modify-phases %standard-phases
95 (replace 'configure
96 (lambda _
97 (substitute* "Makefile" (("\\$\\{CC\\}") "gcc"))
98 #t))
99 (replace 'install
100 (lambda* (#:key outputs #:allow-other-keys)
101 (let ((out (assoc-ref outputs "out")))
102 (zero?
103 (system* "make" "install"
104 (string-append "DESTDIR=" out) "PREFIX=")))))
105 (add-after 'build 'install-xsession
106 (lambda* (#:key outputs #:allow-other-keys)
107 ;; Add a .desktop file to xsessions.
108 (let* ((output (assoc-ref outputs "out"))
109 (xsessions (string-append output "/share/xsessions")))
110 (mkdir-p xsessions)
111 (with-output-to-file
112 (string-append xsessions "/dwm.desktop")
113 (lambda _
114 (format #t
115 "[Desktop Entry]~@
116 Name=dwm~@
117 Comment=Dynamic Window Manager~@
118 Exec=~a/bin/dwm~@
119 TryExec=~@*~a/bin/dwm~@
120 Icon=~@
121 Type=Application~%"
122 output)))
123 #t))))))
124 (inputs
125 `(("freetype" ,freetype)
126 ("libx11" ,libx11)
127 ("libxft" ,libxft)
128 ("libxinerama" ,libxinerama)))
129 (home-page "http://dwm.suckless.org/")
130 (synopsis "Dynamic window manager")
131 (description
132 "dwm is a dynamic window manager for X. It manages windows in tiled,
133 monocle and floating layouts. All of the layouts can be applied dynamically,
134 optimising the environment for the application in use and the task performed.")
135 (license license:x11)))
136
137 (define-public dmenu
138 (package
139 (name "dmenu")
140 (version "4.7")
141 (source (origin
142 (method url-fetch)
143 (uri (string-append "http://dl.suckless.org/tools/dmenu-"
144 version ".tar.gz"))
145 (sha256
146 (base32
147 "1fgph549i0yw62x02jhfc8qmqk2rnzcnm46bxq6jig1cvkw3amm7"))))
148 (build-system gnu-build-system)
149 (arguments
150 '(#:tests? #f ; no tests
151 #:make-flags (list "CC=gcc"
152 (string-append "PREFIX=" %output)
153 (string-append "FREETYPEINC="
154 (assoc-ref %build-inputs "freetype")
155 "/include/freetype2"))
156 #:phases
157 (alist-delete 'configure %standard-phases)))
158 (inputs
159 `(("freetype" ,freetype)
160 ("libxft" ,libxft)
161 ("libx11" ,libx11)
162 ("libxinerama" ,libxinerama)))
163 (home-page "http://tools.suckless.org/dmenu/")
164 (synopsis "Dynamic menu")
165 (description
166 "A dynamic menu for X, originally designed for dwm. It manages large
167 numbers of user-defined menu items efficiently.")
168 (license license:x11)))
169
170 (define-public spoon
171 (package
172 (name "spoon")
173 (version "0.3")
174 (source
175 (origin
176 (method url-fetch)
177 (uri (string-append "https://dl.2f30.org/releases/"
178 name "-" version ".tar.gz"))
179 (sha256
180 (base32
181 "10c5i7ykpy7inzzfiw1dh0srpkljycr3blxhvd8160wsvplbws48"))))
182 (build-system gnu-build-system)
183 (arguments
184 `(#:tests? #f ; No tests
185 #:make-flags (list "CC=gcc"
186 (string-append "PREFIX=" %output))))
187 (inputs
188 `(("libx11" ,libx11)
189 ("libxkbfile" ,libxkbfile)
190 ("alsa-lib" ,alsa-lib)
191 ("libmpdclient" ,libmpdclient)))
192 (home-page "https://git.2f30.org/spoon/")
193 (synopsis "Set dwm status")
194 (description
195 "Spoon can be used to set the dwm status.")
196 (license license:isc)))
197
198 (define-public slock
199 (package
200 (name "slock")
201 (version "1.4")
202 (source (origin
203 (method url-fetch)
204 (uri (string-append "http://dl.suckless.org/tools/slock-"
205 version ".tar.gz"))
206 (sha256
207 (base32
208 "0sif752303dg33f14k6pgwq2jp1hjyhqv6x4sy3sj281qvdljf5m"))))
209 (build-system gnu-build-system)
210 (arguments
211 '(#:tests? #f ; no tests
212 #:make-flags (list "CC=gcc"
213 (string-append "PREFIX=" %output))
214 #:phases (alist-delete 'configure %standard-phases)))
215 (inputs
216 `(("libx11" ,libx11)
217 ("libxext" ,libxext)
218 ("libxinerama" ,libxinerama)
219 ("libxrandr" ,libxrandr)))
220 (home-page "http://tools.suckless.org/slock/")
221 (synopsis "Simple X session lock")
222 (description
223 "Simple X session lock with trivial feedback on password entry.")
224 (license license:x11)))
225
226 (define-public st
227 (package
228 (name "st")
229 (version "0.7")
230 (source
231 (origin
232 (method url-fetch)
233 (uri (string-append "http://dl.suckless.org/st/st-"
234 version ".tar.gz"))
235 (sha256
236 (base32
237 "00309qiw20rc89696pk8bdr7ik4r1aarik7jxqk8k66cdj80v1zp"))))
238 (build-system gnu-build-system)
239 (arguments
240 '(#:tests? #f ; no tests
241 #:make-flags (list "CC=gcc"
242 (string-append "PREFIX=" %output))
243 #:phases
244 (modify-phases %standard-phases
245 (delete 'configure)
246 (add-after 'unpack 'inhibit-terminfo-install
247 (lambda _
248 (substitute* "Makefile"
249 (("\t@tic -s st.info") ""))
250 #t)))))
251 (inputs
252 `(("libx11" ,libx11)
253 ("libxft" ,libxft)
254 ("fontconfig" ,fontconfig)
255 ("freetype" ,freetype)))
256 (native-inputs `(("pkg-config" ,pkg-config)))
257 (home-page "http://st.suckless.org/")
258 (synopsis "Simple terminal emulator")
259 (description
260 "St implements a simple and lightweight terminal emulator. It
261 implements 256 colors, most VT10X escape sequences, utf8, X11 copy/paste,
262 antialiased fonts (using fontconfig), fallback fonts, resizing, and line
263 drawing.")
264 (license license:x11)))
265
266 (define-public surf
267 (package
268 (name "surf")
269 (version "2.0")
270 (source
271 (origin
272 (method url-fetch)
273 (uri (string-append "http://dl.suckless.org/surf/surf-"
274 version ".tar.gz"))
275 (sha256
276 (base32
277 "07cmajyafljigy10d21kkyvv5jf3hxkx06pz3rwwk3y3c9x4rvps"))))
278 (build-system glib-or-gtk-build-system)
279 (arguments
280 '(#:tests? #f ; no tests
281 #:make-flags (list "CC=gcc"
282 (string-append "PREFIX=" %output))
283 #:phases
284 (modify-phases %standard-phases
285 (delete 'configure)
286 ;; Use the right file name for dmenu and xprop.
287 (add-before 'build 'set-dmenu-and-xprop-file-name
288 (lambda* (#:key inputs #:allow-other-keys)
289 (substitute* "config.def.h"
290 (("dmenu") (string-append (assoc-ref inputs "dmenu") "/bin/dmenu"))
291 (("xprop") (string-append (assoc-ref inputs "xprop") "/bin/xprop")))
292 #t)))))
293 (inputs
294 `(("dmenu" ,dmenu)
295 ("glib-networking" ,glib-networking)
296 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
297 ("webkitgtk" ,webkitgtk)
298 ("xprop" ,xprop)))
299 (native-inputs
300 `(("pkg-config" ,pkg-config)))
301 (home-page "http://surf.suckless.org/")
302 (synopsis "Simple web browser")
303 (description
304 "Surf is a simple web browser based on WebKit/GTK+. It is able to
305 display websites and follow links. It supports the XEmbed protocol which
306 makes it possible to embed it in another application. Furthermore, one can
307 point surf to another URI by setting its XProperties.")
308 (license license:x11)))
309
310 (define-public sent
311 (package
312 (name "sent")
313 (version "0.2")
314 (source (origin
315 (method url-fetch)
316 (uri (string-append "http://dl.suckless.org/tools/sent-"
317 version ".tar.gz"))
318 (sha256
319 (base32
320 "0xhh752hwaa26k4q6wvrb9jnpbnylss2aw6z11j7l9rav7wn3fak"))))
321 (build-system gnu-build-system)
322 (arguments
323 `(#:phases (modify-phases %standard-phases
324 (delete 'configure)) ;no configuration
325 #:tests? #f ;no test suite
326 #:make-flags (let ((pkg-config (lambda (flag)
327 (string-append
328 "$(shell pkg-config " flag " "
329 "xft fontconfig x11 libpng)"))))
330 (list
331 "CC=gcc"
332 (string-append "PREFIX=" %output)
333 (string-append "INCS=-I. " (pkg-config "--cflags"))
334 (string-append "LIBS=" (pkg-config "--libs") " -lm")))))
335 (native-inputs
336 `(("pkg-config" ,pkg-config)))
337 (inputs
338 `(("libpng" ,libpng)
339 ("libx11" ,libx11)
340 ("libxft" ,libxft)
341 ("fontconfig" ,fontconfig)))
342 (synopsis "Plaintext presentation tool")
343 (description "Sent uses plaintext files and PNG images to create slideshow
344 presentations. Each paragraph represents a slide in the presentation.
345 Especially for presentations using the Takahashi method this is very nice and
346 allows you to write down the presentation for a quick lightning talk within a
347 few minutes.")
348 (home-page "http://tools.suckless.org/sent")
349 (license license:x11)))
350
351 (define-public xbattmon
352 (package
353 (name "xbattmon")
354 (version "0.9")
355 (source
356 (origin
357 (method url-fetch)
358 (uri (string-append "https://dl.2f30.org/releases/"
359 name "-" version ".tar.gz"))
360 (sha256
361 (base32
362 "0n2rrjq03pgqrdkl7cz5snsfdanf4s58w9h6dbvnl7p8bbd3j2kn"))))
363 (build-system gnu-build-system)
364 (arguments
365 `(#:tests? #f ; No tests
366 #:make-flags (list "CC=gcc"
367 (string-append "PREFIX=" %output))))
368 (inputs
369 `(("libx11" ,libx11)))
370 (home-page "https://git.2f30.org/xbattmon/")
371 (synopsis "Simple battery monitor for X")
372 (description
373 "Xbattmon is a simple battery monitor for X.")
374 (license license:isc)))
375
376 (define-public wificurse
377 (package
378 (name "wificurse")
379 (version "0.3.9")
380 (source
381 (origin
382 (method url-fetch)
383 (uri (string-append "https://dl.2f30.org/releases/"
384 name "-" version ".tar.gz"))
385 (sha256
386 (base32
387 "067ghr1xly5ca41kc83xila1p5hpq0bxfcmc8jvxi2ggm6wrhavn"))))
388 (build-system gnu-build-system)
389 (arguments
390 `(#:tests? #f ; No tests
391 #:make-flags (list
392 (string-append "PREFIX=" %output))
393 #:phases
394 (modify-phases %standard-phases
395 (delete 'configure)))) ; No configure script
396 (home-page "https://git.2f30.org/wificurse/")
397 (synopsis "Wifi DoS attack tool")
398 (description
399 "Wificurses listens for beacons sent from wireless access points
400 in the range of your wireless station. Once received the program
401 extracts the BSSID of the AP and transmits deauthentication packets
402 using the broadcast MAC address. This results to the disconnection
403 of all clients connected to the AP at the time of the attack. This
404 is essencially a WiFi DoS attack tool created for educational
405 purposes only. It works only in Linux and requires wireless card
406 drivers capable of injecting packets in wireless networks.")
407 (license license:gpl3+)))
408
409 (define-public skroll
410 (package
411 (name "skroll")
412 (version "0.6")
413 (source
414 (origin
415 (method url-fetch)
416 (uri (string-append "https://dl.2f30.org/releases/"
417 name "-" version ".tar.gz"))
418 (sha256
419 (base32
420 "0km6bjfz4ssb1z0xwld6iiixnn7d255ax8yjs3zkdm42z8q9yl0f"))))
421 (build-system gnu-build-system)
422 (arguments
423 `(#:tests? #f ; No tests
424 #:make-flags (list "CC=gcc"
425 (string-append "PREFIX=" %output))
426 #:phases
427 (modify-phases %standard-phases
428 (delete 'configure)))) ; No configure script
429 (home-page "https://2f30.org/")
430 (synopsis "Commandline utility which scrolls text")
431 (description
432 "Skroll is a small utility that you can use to make a text scroll.
433 Pipe text to it, and it will scroll a given number of letters from right to
434 left.")
435 (license license:wtfpl2)))
436
437 (define-public sbm
438 (package
439 (name "sbm")
440 (version "0.9")
441 (source
442 (origin
443 (method url-fetch)
444 (uri (string-append "https://dl.2f30.org/releases/"
445 name "-" version ".tar.gz"))
446 (sha256
447 (base32
448 "1nks5mkh5wn30kyjzlkjlgi31bv1wq52kbp0r6nzbyfnvfdlywik"))))
449 (build-system gnu-build-system)
450 (arguments
451 `(#:tests? #f ; No tests
452 #:make-flags (list "CC=gcc"
453 (string-append "PREFIX=" %output))
454 #:phases
455 (modify-phases %standard-phases
456 (delete 'configure)))) ; No configure script
457 (home-page "https://git.2f30.org/sbm/")
458 (synopsis "Simple bandwidth monitor")
459 (description
460 "Sbm is a simple bandwidth monitor.")
461 (license license:isc)))
462
463 (define-public prout
464 (package
465 (name "prout")
466 (version "0.2")
467 (source
468 (origin
469 (method url-fetch)
470 (uri (string-append "https://dl.2f30.org/releases/"
471 name "-" version ".tar.gz"))
472 (sha256
473 (base32
474 "1s6c3ygg1h1fyxkh8gd7nzjk6qhnwsb4535d2k780kxnwns5fzas"))))
475 (build-system gnu-build-system)
476 (arguments
477 `(#:tests? #f ; No tests
478 #:make-flags (list "CC=gcc"
479 (string-append "PREFIX=" %output))
480 #:phases
481 (modify-phases %standard-phases
482 (delete 'configure)))) ; No configure script
483 (inputs
484 `(("cups-minimal" ,cups-minimal)
485 ("zlib" ,zlib)))
486 (home-page "https://git.2f30.org/prout/")
487 (synopsis "Smaller lp command")
488 (description
489 "Prout (PRint OUT) is a small utility one can use to send
490 documents to a printer.
491 It has no feature, and does nothing else. Just set your default
492 printer in client.conf(5) and start printing. No need for a local
493 cups server to be installed.")
494 (license license:wtfpl2)))
495
496 (define-public noice
497 (package
498 (name "noice")
499 (version "0.6")
500 (source
501 (origin
502 (method url-fetch)
503 (uri (string-append "https://dl.2f30.org/releases/"
504 name "-" version ".tar.gz"))
505 (sha256
506 (base32
507 "0ldkbb71z6k4yzj4kpg3s94ijj1c1kx9dfcjz393py09scfyg5hr"))))
508 (build-system gnu-build-system)
509 (arguments
510 `(#:tests? #f ; No tests
511 #:make-flags (list "CC=gcc"
512 (string-append "PREFIX=" %output))
513 #:phases
514 (modify-phases %standard-phases
515 (delete 'configure) ; No configure script
516 (add-before 'build 'curses
517 (lambda _
518 (substitute* "Makefile"
519 (("lcurses") "lncurses")))))))
520 (inputs
521 `(("ncurses" ,ncurses)))
522 (home-page "https://git.2f30.org/noice/")
523 (synopsis "Small file browser")
524 (description
525 "Noice is a small curses-based file browser.")
526 (license license:bsd-2)))
527
528 ;;; We want some commits that are more recent than the latest release, 0.2
529 (define-public human
530 (let ((commit "50c80e6ba12823184b6866e06b955dbd2ccdc5d7")
531 (revision "1"))
532 (package
533 (name "human")
534 (version (string-append "0.2-" revision "." (string-take commit 7)))
535 (source
536 (origin
537 (method git-fetch)
538 (uri (git-reference
539 (url "git://git.2f30.org/human.git")
540 (commit commit)))
541 (file-name (string-append name "-" version "-checkout"))
542 (sha256
543 (base32
544 "18xngm4h9vsyip52zwd79rrp1irzg6rs462lpbp61amf7hj955gn"))))
545 (build-system gnu-build-system)
546 (arguments
547 `(#:tests? #f ; No tests
548 #:make-flags (list "CC=gcc"
549 (string-append "PREFIX=" %output))
550 #:phases
551 (modify-phases %standard-phases
552 (delete 'configure)))) ; No configure script
553 (home-page "https://git.2f30.org/human/")
554 (synopsis "Convert bytes to human readable formats")
555 (description
556 "Human is a small program which translate numbers into a
557 human readable format. By default, it tries to detect the best
558 factorisation, but you can force its output.
559 You can adjust the number of decimals with the @code{SCALE}
560 environment variable.")
561 (license license:wtfpl2))))
562
563 (define-public fortify-headers
564 (package
565 (name "fortify-headers")
566 (version "0.8")
567 (source
568 (origin
569 (method url-fetch)
570 (uri (string-append "https://dl.2f30.org/releases/"
571 name "-" version ".tar.gz"))
572 (sha256
573 (base32
574 "1cacdczpjb49c4i1168g541wnl3i3gbpv2m2wbnmw5wddlyhgkdg"))))
575 (build-system gnu-build-system)
576 (arguments
577 `(#:tests? #f ; No tests
578 #:make-flags (list "CC=gcc"
579 (string-append "PREFIX=" %output))
580 #:phases
581 (modify-phases %standard-phases
582 (delete 'configure)))) ; No configure script
583 (home-page "https://git.2f30.org/fortify-headers/")
584 (synopsis "Standalone fortify-source implementation")
585 (description
586 "This is a standalone implementation of fortify source. It provides
587 compile time buffer checks. It is libc-agnostic and simply overlays the
588 system headers by using the @code{#include_next} extension found in GCC. It was
589 initially intended to be used on musl-based Linux distributions.
590
591 @itemize
592 @item It is portable, works on *BSD, Linux, Solaris and possibly others.
593 @item It will only trap non-conformant programs. This means that fortify
594 level 2 is treated in the same way as level 1.
595 @item Avoids making function calls when undefined behaviour has already been
596 invoked. This is handled by using @code{__builtin_trap()}.
597 @item Support for out-of-bounds read interfaces, such as @code{send()},
598 @code{write()}, @code{fwrite()}, etc.
599 @item No ABI is enforced. All of the fortify check functions are inlined
600 into the resulting binary.
601 @end itemize\n")
602 (license license:isc)))
603
604 (define-public colors
605 (package
606 (name "colors")
607 (version "0.3")
608 (source
609 (origin
610 (method url-fetch)
611 (uri (string-append "https://dl.2f30.org/releases/"
612 name "-" version ".tar.gz"))
613 (sha256
614 (base32
615 "1lckmqpgj89841splng0sszbls2ag71ggkgr1wsv9y3v6y87589z"))))
616 (build-system gnu-build-system)
617 (arguments
618 `(#:tests? #f ; No tests
619 #:make-flags (list "CC=gcc"
620 (string-append "PREFIX=" %output))
621 #:phases
622 (modify-phases %standard-phases
623 (delete 'configure)))) ; No configure script
624 (inputs
625 `(("libpng" ,libpng)))
626 (home-page "https://git.2f30.org/colors/")
627 (synopsis "Extract colors from pictures")
628 (description
629 "Extract colors from PNG files. It is similar to
630 strings(1) but for pictures. For a given input file it outputs a
631 colormap to stdout.")
632 (license license:isc)))
633
634 ;; No new releases were made at github, this repository is more active than
635 ;; the one at http://git.suckless.org/libutf/ and it is
636 ;; done by the same developer.
637 (define-public libutf
638 (let ((revision "1")
639 (commit "ff4c60635e1f455b0a0b4200f8183fbd5a88225b"))
640 (package
641 (name "libutf")
642 (version (string-append "0.0.0-" revision "." (string-take commit 7)))
643 (source
644 (origin
645 (method git-fetch)
646 (uri (git-reference
647 (url "https://github.com/cls/libutf")
648 (commit commit)))
649 (file-name (string-append name "-" version "-checkout"))
650 (sha256
651 (base32
652 "1ih5vjavilzggyr1j1z6w1z12c2fs5fg77cfnv7ami5ivsy3kg3d"))))
653 (build-system gnu-build-system)
654 (arguments
655 `(#:tests? #f ; No tests
656 #:make-flags (list "CC=gcc"
657 (string-append "PREFIX=" %output))
658 #:phases
659 (modify-phases %standard-phases
660 (delete 'configure)))) ; No configure script
661 (inputs
662 `(("gawk" ,gawk)))
663 (home-page "https://github.com/cls/libutf")
664 (synopsis "Plan 9 compatible UTF-8 library")
665 (description
666 "This is a C89 UTF-8 library, with an API compatible with that of
667 Plan 9's libutf, but with a number of improvements:
668
669 @itemize
670 @item Support for runes beyond the Basic Multilingual Plane.
671 @item utflen and utfnlen cannot overflow on 32- or 64-bit machines.
672 @item chartorune treats all invalid codepoints as though Runeerror.
673 @item fullrune, utfecpy, and utfnlen do not overestimate the length
674 of malformed runes.
675 @item An extra function, charntorune(p,s,n), equivalent to
676 fullrune(s,n) ? chartorune(p,s): 0.
677 @item Runeerror may be set to an alternative replacement value, such
678 as -1, to be used instead of U+FFFD.
679 @end itemize\n")
680 (license license:expat))))
681
682 ;; No release tarballs so far.
683 (define-public lchat
684 (let ((revision "2")
685 (commit "25d90f4630b45e2b609d2e3daecb32cf5ff065fd"))
686 (package
687 (name "lchat")
688 (version (string-append "0.0.0-" revision "." (string-take commit 7)))
689 (source
690 (origin
691 (method git-fetch)
692 (uri (git-reference
693 (url "https://github.com/younix/lchat")
694 (commit commit)))
695 (file-name (string-append name "-" version "-checkout"))
696 (sha256
697 (base32
698 "0dvljyq3m7rxxkqv7rkmijak6vj8i4db3iq2z988bvf76chz268b"))))
699 (build-system gnu-build-system)
700 (arguments
701 `(#:tests? #f ; No tests
702 #:make-flags (list "CC=gcc"
703 (string-append "PREFIX=" %output))
704 #:phases
705 (modify-phases %standard-phases
706 (delete 'configure) ; No configure script
707 (add-before 'build 'libbsd
708 (lambda _
709 (substitute* "Makefile"
710 (("-lutf") "-lutf -lbsd"))))
711 (replace 'install
712 (lambda* (#:key outputs #:allow-other-keys)
713 (let* ((out (assoc-ref outputs "out"))
714 (bin (string-append out "/bin")))
715 (install-file "lchat" bin)
716 #t))))))
717 (inputs
718 `(("grep" ,grep)
719 ("ncurses" ,ncurses)
720 ("libutf" ,libutf)
721 ("libbsd" ,libbsd)))
722 (home-page "https://github.com/younix/lchat")
723 (synopsis "Line chat is a frontend for the irc client ii from suckless")
724 (description
725 "Lchat (line chat) is the little and small brother of cii.
726 It is a front end for ii-like chat programs. It uses tail(1) -f to get the
727 chat output in background.")
728 (license license:isc))))