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