gnu: igt-gpu-tools: Don't use NAME in source URI.
[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, 2019 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 (invoke "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 "https://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.8")
141 (source (origin
142 (method url-fetch)
143 (uri (string-append "https://dl.suckless.org/tools/dmenu-"
144 version ".tar.gz"))
145 (sha256
146 (base32
147 "0qfvfrj10xlwd9hkvb57wshryan65bl6423h0qhiw1h76rf5lqgy"))))
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 (modify-phases %standard-phases (delete 'configure))))
158 (inputs
159 `(("freetype" ,freetype)
160 ("libxft" ,libxft)
161 ("libx11" ,libx11)
162 ("libxinerama" ,libxinerama)))
163 (home-page "https://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.6")
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 "1jpmg9k9f4f3lpz0k3cphqjswlyf8lz2sm8ccifiip93kd4rrdj0"))))
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) ; tinyalsa (unpackaged) would suffice
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 "https://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 (modify-phases %standard-phases (delete 'configure))))
215 (inputs
216 `(("libx11" ,libx11)
217 ("libxext" ,libxext)
218 ("libxinerama" ,libxinerama)
219 ("libxrandr" ,libxrandr)))
220 (home-page "https://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.8.1")
230 (source
231 (origin
232 (method url-fetch)
233 (uri (string-append "https://dl.suckless.org/st/st-"
234 version ".tar.gz"))
235 (sha256
236 (base32
237 "09k94v3n20gg32xy7y68p96x9dq5msl80gknf9gbvlyjp3i0zyy4"))))
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 (("\ttic .*") ""))
250 #t)))))
251 (inputs
252 `(("libx11" ,libx11)
253 ("libxft" ,libxft)
254 ("fontconfig" ,fontconfig)
255 ("freetype" ,freetype)))
256 (native-inputs
257 `(("pkg-config" ,pkg-config)))
258 (home-page "https://st.suckless.org/")
259 (synopsis "Simple terminal emulator")
260 (description
261 "St implements a simple and lightweight terminal emulator. It
262 implements 256 colors, most VT10X escape sequences, utf8, X11 copy/paste,
263 antialiased fonts (using fontconfig), fallback fonts, resizing, and line
264 drawing.")
265 (license license:x11)))
266
267 (define-public surf
268 (package
269 (name "surf")
270 (version "2.0")
271 (source
272 (origin
273 (method url-fetch)
274 (uri (string-append "https://dl.suckless.org/surf/surf-"
275 version ".tar.gz"))
276 (sha256
277 (base32
278 "07cmajyafljigy10d21kkyvv5jf3hxkx06pz3rwwk3y3c9x4rvps"))))
279 (build-system glib-or-gtk-build-system)
280 (arguments
281 '(#:tests? #f ; no tests
282 #:make-flags (list "CC=gcc"
283 (string-append "PREFIX=" %output))
284 #:phases
285 (modify-phases %standard-phases
286 (delete 'configure)
287 ;; Use the right file name for dmenu and xprop.
288 (add-before 'build 'set-dmenu-and-xprop-file-name
289 (lambda* (#:key inputs #:allow-other-keys)
290 (substitute* "config.def.h"
291 (("dmenu") (string-append (assoc-ref inputs "dmenu") "/bin/dmenu"))
292 (("xprop") (string-append (assoc-ref inputs "xprop") "/bin/xprop")))
293 #t)))))
294 (inputs
295 `(("dmenu" ,dmenu)
296 ("glib-networking" ,glib-networking)
297 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
298 ("webkitgtk" ,webkitgtk)
299 ("xprop" ,xprop)))
300 (native-inputs
301 `(("pkg-config" ,pkg-config)))
302 (home-page "https://surf.suckless.org/")
303 (synopsis "Simple web browser")
304 (description
305 "Surf is a simple web browser based on WebKit/GTK+. It is able to
306 display websites and follow links. It supports the XEmbed protocol which
307 makes it possible to embed it in another application. Furthermore, one can
308 point surf to another URI by setting its XProperties.")
309 (license license:x11)))
310
311 (define-public sent
312 (package
313 (name "sent")
314 (version "1")
315 (source (origin
316 (method url-fetch/tarbomb)
317 (uri (string-append "https://dl.suckless.org/tools/sent-"
318 version ".tar.gz"))
319 (sha256
320 (base32
321 "0cxysz5lp25mgww73jl0mgip68x7iyvialyzdbriyaff269xxwvv"))))
322 (build-system gnu-build-system)
323 (arguments
324 `(#:phases (modify-phases %standard-phases
325 (delete 'configure)) ; no configuration
326 #:tests? #f ; no test suite
327 #:make-flags (let ((pkg-config (lambda (flag)
328 (string-append
329 "$(shell pkg-config " flag " "
330 "xft fontconfig x11 libpng)"))))
331 (list
332 "CC=gcc"
333 (string-append "PREFIX=" %output)
334 (string-append "INCS=-I. " (pkg-config "--cflags"))
335 (string-append "LIBS=" (pkg-config "--libs") " -lm")))))
336 (native-inputs
337 `(("pkg-config" ,pkg-config)))
338 (inputs
339 `(("libpng" ,libpng)
340 ("libx11" ,libx11)
341 ("libxft" ,libxft)
342 ("fontconfig" ,fontconfig)))
343 (synopsis "Plain-text presentation tool")
344 (description "Sent uses plain-text files and PNG images to create slideshow
345 presentations. Each paragraph represents a slide in the presentation.
346 Especially for presentations using the Takahashi method this is very nice and
347 allows you to write down the presentation for a quick lightning talk within a
348 few minutes.")
349 (home-page "https://tools.suckless.org/sent")
350 (license license:x11)))
351
352 (define-public xbattmon
353 (package
354 (name "xbattmon")
355 (version "1.1")
356 (source
357 (origin
358 (method url-fetch)
359 (uri (string-append "https://dl.2f30.org/releases/"
360 name "-" version ".tar.gz"))
361 (sha256
362 (base32
363 "1zr6y8lml9xkx0a3dbbsds2qz1bjxvskp7wsckkf8mlsqrbb3xsg"))))
364 (build-system gnu-build-system)
365 (arguments
366 `(#:tests? #f ; No tests
367 #:make-flags (list "CC=gcc"
368 (string-append "PREFIX=" %output))))
369 (inputs
370 `(("libx11" ,libx11)))
371 (home-page "https://git.2f30.org/xbattmon/")
372 (synopsis "Simple battery monitor for X")
373 (description
374 "Xbattmon is a simple battery monitor for X.")
375 (license license:isc)))
376
377 (define-public wificurse
378 (package
379 (name "wificurse")
380 (version "0.3.9")
381 (source
382 (origin
383 (method url-fetch)
384 (uri (string-append "https://dl.2f30.org/releases/"
385 name "-" version ".tar.gz"))
386 (sha256
387 (base32
388 "067ghr1xly5ca41kc83xila1p5hpq0bxfcmc8jvxi2ggm6wrhavn"))))
389 (build-system gnu-build-system)
390 (arguments
391 `(#:tests? #f ; No tests
392 #:make-flags (list
393 (string-append "PREFIX=" %output))
394 #:phases
395 (modify-phases %standard-phases
396 (delete 'configure)))) ; No configure script
397 (home-page "https://git.2f30.org/wificurse/")
398 (synopsis "Wifi DoS attack tool")
399 (description
400 "Wificurses listens for beacons sent from wireless access points
401 in the range of your wireless station. Once received the program
402 extracts the BSSID of the AP and transmits deauthentication packets
403 using the broadcast MAC address. This results to the disconnection
404 of all clients connected to the AP at the time of the attack. This
405 is essencially a WiFi DoS attack tool created for educational
406 purposes only. It works only in Linux and requires wireless card
407 drivers capable of injecting packets in wireless networks.")
408 (license license:gpl3+)))
409
410 (define-public skroll
411 (package
412 (name "skroll")
413 (version "0.6")
414 (source
415 (origin
416 (method url-fetch)
417 (uri (string-append "https://dl.2f30.org/releases/"
418 name "-" version ".tar.gz"))
419 (sha256
420 (base32
421 "0km6bjfz4ssb1z0xwld6iiixnn7d255ax8yjs3zkdm42z8q9yl0f"))))
422 (build-system gnu-build-system)
423 (arguments
424 `(#:tests? #f ; No tests
425 #:make-flags (list "CC=gcc"
426 (string-append "PREFIX=" %output))
427 #:phases
428 (modify-phases %standard-phases
429 (delete 'configure)))) ; No configure script
430 (home-page "https://2f30.org/")
431 (synopsis "Commandline utility which scrolls text")
432 (description
433 "Skroll is a small utility that you can use to make a text scroll.
434 Pipe text to it, and it will scroll a given number of letters from right to
435 left.")
436 (license license:wtfpl2)))
437
438 (define-public sbm
439 (package
440 (name "sbm")
441 (version "0.9")
442 (source
443 (origin
444 (method url-fetch)
445 (uri (string-append "https://dl.2f30.org/releases/"
446 name "-" version ".tar.gz"))
447 (sha256
448 (base32
449 "1nks5mkh5wn30kyjzlkjlgi31bv1wq52kbp0r6nzbyfnvfdlywik"))))
450 (build-system gnu-build-system)
451 (arguments
452 `(#:tests? #f ; No tests
453 #:make-flags (list "CC=gcc"
454 (string-append "PREFIX=" %output))
455 #:phases
456 (modify-phases %standard-phases
457 (delete 'configure)))) ; No configure script
458 (home-page "https://git.2f30.org/sbm/")
459 (synopsis "Simple bandwidth monitor")
460 (description
461 "Sbm is a simple bandwidth monitor.")
462 (license license:isc)))
463
464 (define-public prout
465 (package
466 (name "prout")
467 (version "0.2")
468 (source
469 (origin
470 (method url-fetch)
471 (uri (string-append "https://dl.2f30.org/releases/"
472 name "-" version ".tar.gz"))
473 (sha256
474 (base32
475 "1s6c3ygg1h1fyxkh8gd7nzjk6qhnwsb4535d2k780kxnwns5fzas"))))
476 (build-system gnu-build-system)
477 (arguments
478 `(#:tests? #f ; No tests
479 #:make-flags (list "CC=gcc"
480 (string-append "PREFIX=" %output))
481 #:phases
482 (modify-phases %standard-phases
483 (delete 'configure)))) ; No configure script
484 (inputs
485 `(("cups-minimal" ,cups-minimal)
486 ("zlib" ,zlib)))
487 (home-page "https://git.2f30.org/prout/")
488 (synopsis "Smaller lp command")
489 (description
490 "Prout (PRint OUT) is a small utility one can use to send
491 documents to a printer.
492 It has no feature, and does nothing else. Just set your default
493 printer in client.conf(5) and start printing. No need for a local
494 cups server to be installed.")
495 (license license:wtfpl2)))
496
497 (define-public noice
498 (package
499 (name "noice")
500 (version "0.7")
501 (source
502 (origin
503 (method url-fetch)
504 (uri (string-append "https://dl.2f30.org/releases/"
505 name "-" version ".tar.gz"))
506 (sha256
507 (base32
508 "03b0kzngzacfpz4n8lgbvia2s765i5bkw55v482hh4m49dm41gpc"))))
509 (build-system gnu-build-system)
510 (arguments
511 `(#:tests? #f ; no tests
512 #:make-flags (list "CC=gcc"
513 (string-append "PREFIX=" %output))
514 #:phases
515 (modify-phases %standard-phases
516 (delete 'configure) ; no configure script
517 (add-before 'build 'curses
518 (lambda _
519 (substitute* "Makefile"
520 (("lcurses") "lncurses")))))))
521 (inputs
522 `(("ncurses" ,ncurses)))
523 (home-page "https://git.2f30.org/noice/")
524 (synopsis "Small file browser")
525 (description
526 "Noice is a small curses-based file browser.")
527 (license license:bsd-2)))
528
529 (define-public human
530 (package
531 (name "human")
532 (version "0.3")
533 (source
534 (origin
535 (method git-fetch)
536 (uri (git-reference
537 (url "git://git.2f30.org/human.git")
538 (commit version)))
539 (file-name (git-file-name name version))
540 (sha256
541 (base32
542 "0y0bsmvpwfwb2lwspi6a799y34h1faxc6yfanyw6hygxc8661mga"))))
543 (build-system gnu-build-system)
544 (arguments
545 `(#:tests? #f ; no tests
546 #:make-flags (list "CC=gcc"
547 (string-append "PREFIX=" %output))
548 #:phases
549 (modify-phases %standard-phases
550 (delete 'configure)))) ; no configure script
551 (home-page "https://git.2f30.org/human/")
552 (synopsis "Convert bytes to human readable formats")
553 (description
554 "Human is a small program which translate numbers into a
555 human readable format. By default, it tries to detect the best
556 factorisation, but you can force its output.
557 You can adjust the number of decimals with the @code{SCALE}
558 environment variable.")
559 (license license:wtfpl2)))
560
561 (define-public fortify-headers
562 (package
563 (name "fortify-headers")
564 (version "1.0")
565 (source
566 (origin
567 (method url-fetch)
568 (uri (string-append "https://dl.2f30.org/releases/"
569 name "-" version ".tar.gz"))
570 (sha256
571 (base32
572 "0nvplfg4y4a10x2j12qwmxzlk2q4j6287j0v5f9bfsdayb04qvh2"))))
573 (build-system gnu-build-system)
574 (arguments
575 `(#:tests? #f ; no tests
576 #:make-flags (list "CC=gcc"
577 (string-append "PREFIX=" %output))
578 #:phases
579 (modify-phases %standard-phases
580 (delete 'configure)))) ; no configure script
581 (home-page "https://git.2f30.org/fortify-headers/")
582 (synopsis "Standalone fortify-source implementation")
583 (description
584 "This is a standalone implementation of fortify source. It provides
585 compile time buffer checks. It is libc-agnostic and simply overlays the
586 system headers by using the @code{#include_next} extension found in GCC. It was
587 initially intended to be used on musl-based Linux distributions.
588
589 @itemize
590 @item It is portable, works on *BSD, Linux, Solaris and possibly others.
591 @item It will only trap non-conformant programs. This means that fortify
592 level 2 is treated in the same way as level 1.
593 @item Avoids making function calls when undefined behaviour has already been
594 invoked. This is handled by using @code{__builtin_trap()}.
595 @item Support for out-of-bounds read interfaces, such as @code{send()},
596 @code{write()}, @code{fwrite()}, etc.
597 @item No ABI is enforced. All of the fortify check functions are inlined
598 into the resulting binary.
599 @end itemize\n")
600 (license license:isc)))
601
602 (define-public colors
603 (package
604 (name "colors")
605 (version "0.3")
606 (source
607 (origin
608 (method url-fetch)
609 (uri (string-append "https://dl.2f30.org/releases/"
610 name "-" version ".tar.gz"))
611 (sha256
612 (base32
613 "1lckmqpgj89841splng0sszbls2ag71ggkgr1wsv9y3v6y87589z"))))
614 (build-system gnu-build-system)
615 (arguments
616 `(#:tests? #f ; No tests
617 #:make-flags (list "CC=gcc"
618 (string-append "PREFIX=" %output))
619 #:phases
620 (modify-phases %standard-phases
621 (delete 'configure)))) ; No configure script
622 (inputs
623 `(("libpng" ,libpng)))
624 (home-page "https://git.2f30.org/colors/")
625 (synopsis "Extract colors from pictures")
626 (description
627 "Extract colors from PNG files. It is similar to
628 strings(1) but for pictures. For a given input file it outputs a
629 colormap to stdout.")
630 (license license:isc)))
631
632 ;; No new releases were made at github, this repository is more active than
633 ;; the one at http://git.suckless.org/libutf/ and it is
634 ;; done by the same developer.
635 (define-public libutf
636 (let ((revision "1")
637 (commit "ff4c60635e1f455b0a0b4200f8183fbd5a88225b"))
638 (package
639 (name "libutf")
640 (version (string-append "0.0.0-" revision "." (string-take commit 7)))
641 (source
642 (origin
643 (method git-fetch)
644 (uri (git-reference
645 (url "https://github.com/cls/libutf")
646 (commit commit)))
647 (file-name (string-append name "-" version "-checkout"))
648 (sha256
649 (base32
650 "1ih5vjavilzggyr1j1z6w1z12c2fs5fg77cfnv7ami5ivsy3kg3d"))))
651 (build-system gnu-build-system)
652 (arguments
653 `(#:tests? #f ; No tests
654 #:make-flags (list "CC=gcc"
655 (string-append "PREFIX=" %output))
656 #:phases
657 (modify-phases %standard-phases
658 (delete 'configure)))) ; No configure script
659 (inputs
660 `(("gawk" ,gawk)))
661 (home-page "https://github.com/cls/libutf")
662 (synopsis "Plan 9 compatible UTF-8 library")
663 (description
664 "This is a C89 UTF-8 library, with an API compatible with that of
665 Plan 9's libutf, but with a number of improvements:
666
667 @itemize
668 @item Support for runes beyond the Basic Multilingual Plane.
669 @item utflen and utfnlen cannot overflow on 32- or 64-bit machines.
670 @item chartorune treats all invalid codepoints as though Runeerror.
671 @item fullrune, utfecpy, and utfnlen do not overestimate the length
672 of malformed runes.
673 @item An extra function, charntorune(p,s,n), equivalent to
674 fullrune(s,n) ? chartorune(p,s): 0.
675 @item Runeerror may be set to an alternative replacement value, such
676 as -1, to be used instead of U+FFFD.
677 @end itemize\n")
678 (license license:expat))))
679
680 ;; No release tarballs so far.
681 (define-public lchat
682 (let ((revision "3")
683 (commit "f95191970fd59c52a8b09cff32bd8d2135cbfc6b"))
684 (package
685 (name "lchat")
686 (version (string-append "0.0.0-" revision "." (string-take commit 7)))
687 (source
688 (origin
689 (method git-fetch)
690 (uri (git-reference
691 (url "https://github.com/younix/lchat")
692 (commit commit)))
693 (file-name (string-append name "-" version "-checkout"))
694 (sha256
695 (base32
696 "07pxzziczhzprmjy61k7nl9i1kxpgnad37qkjf5fn4wf06nqdxpl"))))
697 (build-system gnu-build-system)
698 (arguments
699 `(#:test-target "test"
700 #:make-flags (list "CC=gcc"
701 (string-append "PREFIX=" %output))
702 #:phases
703 (modify-phases %standard-phases
704 (delete 'configure) ; no configure script
705 (add-before 'build 'libbsd
706 (lambda _
707 (substitute* "Makefile"
708 (("-lutf") "-lutf -lbsd"))))
709 (replace 'install
710 (lambda* (#:key outputs #:allow-other-keys)
711 (let* ((out (assoc-ref outputs "out"))
712 (bin (string-append out "/bin"))
713 (man1 (string-append out "/share/man/man1")))
714 (install-file "lchat" bin)
715 (install-file "lchat.1" man1)
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 @code{tail -f} to get the
727 chat output in the background.")
728 (license license:isc))))