projects/guix·blob java-team · refs

657 lines · 27.0 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2012, 2014-2015, 2017-2018, 2021, 2025 Ludovic Courtès <[email protected]>
3;;; Copyright © 2014 David Thompson <[email protected]>
4;;; Copyright © 2015, 2016 Ricardo Wurmus <[email protected]>
5;;; Copyright © 2015 Alex Kost <[email protected]>
6;;; Copyright © 2015, 2016, 2020, 2025 Efraim Flashner <[email protected]>
7;;; Copyright © 2017–2022 Tobias Geerinckx-Rice <[email protected]>
8;;; Copyright © 2018, 2019 Rutger Helling <[email protected]>
9;;; Copyright © 2018, 2019, 2022 Marius Bakke <[email protected]>
10;;; Copyright © 2020 Vincent Legoll <[email protected]>
11;;; Copyright © 2021 Guillaume Le Vaillant <[email protected]>
12;;; Copyright © 2021, 2024 Janneke Nieuwenhuizen <[email protected]>
13;;; Copyright © 2022, 2024 Maxim Cournoyer <[email protected]>
14;;; Copyright © 2022 Imran Iqbal <[email protected]>
15;;; Copyright © 2025 Ashish SHUKLA <[email protected]>
16;;; Copyright © 2025 firefly707 <[email protected]>
17;;;
18;;; This file is part of GNU Guix.
19;;;
20;;; GNU Guix is free software; you can redistribute it and/or modify it
21;;; under the terms of the GNU General Public License as published by
22;;; the Free Software Foundation; either version 3 of the License, or (at
23;;; your option) any later version.
24;;;
25;;; GNU Guix is distributed in the hope that it will be useful, but
26;;; WITHOUT ANY WARRANTY; without even the implied warranty of
27;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28;;; GNU General Public License for more details.
29;;;
30;;; You should have received a copy of the GNU General Public License
31;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
32
33(define-module (gnu packages man)
34 #:use-module (guix gexp)
35 #:use-module ((guix licenses) #:prefix license:)
36 #:use-module (guix git-download)
37 #:use-module (guix download)
38 #:use-module (guix packages)
39 #:use-module (guix build-system gnu)
40 #:use-module (guix build-system meson)
41 #:use-module (guix build-system ruby)
42 #:use-module (guix utils)
43 #:use-module (gnu packages)
44 #:use-module (gnu packages base)
45 #:use-module (gnu packages check)
46 #:use-module (gnu packages cmake)
47 #:use-module (gnu packages compression)
48 #:use-module (gnu packages curl)
49 #:use-module (gnu packages dbm)
50 #:use-module (gnu packages compiler-tools)
51 #:use-module (gnu packages freedesktop)
52 #:use-module (gnu packages gawk)
53 #:use-module (gnu packages gettext)
54 #:use-module (gnu packages groff)
55 #:use-module (gnu packages less)
56 #:use-module (gnu packages linux)
57 #:use-module (gnu packages ncurses)
58 #:use-module (gnu packages perl)
59 #:use-module (gnu packages python-xyz)
60 #:use-module (gnu packages pkg-config)
61 #:use-module (gnu packages web-browsers)
62 #:use-module (gnu packages xml))
63
64(define-public xmltoman
65 (package
66 (name "xmltoman")
67 (version "0.4")
68 (source
69 (origin
70 (method url-fetch)
71 (uri (string-append "mirror://sourceforge/xmltoman/xmltoman/"
72 "xmltoman-" version ".tar.gz/"
73 "xmltoman-" version ".tar.gz"))
74 (sha256
75 (base32 "1c0lvzr7kdy63wbn1jv6s126ds7add3pxqb0vlxd3v5a2sir91wl"))))
76 (build-system gnu-build-system)
77 (arguments
78 `(#:tests? #f ; No tests
79 #:make-flags
80 (list
81 (string-append "PREFIX="
82 (assoc-ref %outputs "out")))
83 #:phases
84 (modify-phases %standard-phases
85 (delete 'configure))))
86 (propagated-inputs
87 (list perl perl-xml-parser))
88 (synopsis "XML to Man converter")
89 (description "XMLtoMan and XMLMantoHTML are two small scripts to convert xml
90to man pages in groff format or html. It features the usual man page items such
91as description, options, see also, etc.")
92 (home-page "http://xmltoman.sourceforge.net/")
93 (license license:gpl2+)))
94
95(define-public libpipeline
96 (package
97 (name "libpipeline")
98 (version "1.5.6")
99 (source (origin
100 (method url-fetch)
101 (uri (string-append
102 "mirror://savannah/libpipeline/libpipeline-"
103 version ".tar.gz"))
104 (sha256
105 (base32
106 "15xpx7kbzkn63ab8mkghv7jkzji8pdbsyxm7ygjji19rvkkvkyv0"))))
107 (build-system gnu-build-system)
108 (home-page "https://libpipeline.nongnu.org/")
109 (synopsis "C library for manipulating pipelines of subprocesses")
110 (description
111 "libpipeline is a C library for manipulating pipelines of subprocesses in
112a flexible and convenient way.")
113 (license license:gpl3+)))
114
115(define-public man-db
116 (package
117 (name "man-db")
118 (version "2.12.0")
119 (source (origin
120 (method url-fetch)
121 (uri (string-append "mirror://savannah/man-db/man-db-"
122 version ".tar.xz"))
123 (sha256
124 (base32
125 "15bak56wf99xdr1p3kaish6pkrrvhl6p2rhgzwiasr17la264nj1"))))
126 (build-system gnu-build-system)
127 (arguments
128 (list #:phases
129 #~(modify-phases %standard-phases
130 (add-after 'patch-source-shebangs 'patch-test-shebangs
131 (lambda* (#:key outputs #:allow-other-keys)
132 ;; Patch shebangs in test scripts.
133 (let ((out (assoc-ref outputs "out")))
134 (for-each (lambda (file)
135 (substitute* file
136 (("#! /bin/sh")
137 (string-append "#!" (which "sh")))))
138 (find-files "src/tests")))))
139 (add-after 'unpack 'patch-absolute-paths
140 (lambda* (#:key inputs #:allow-other-keys)
141 (substitute* "src/man.c"
142 (("\"iconv\"")
143 (string-append "\"" (which "iconv") "\"")))
144 ;; Embed an absolute reference to "preconv", otherwise it
145 ;; falls back to searching in PATH and ultimately fails
146 ;; to render unicode data (see <https://bugs.gnu.org/30785>).
147 (substitute* "lib/encodings.c"
148 (("groff_preconv = NULL")
149 (string-append "groff_preconv = \""
150 (assoc-ref inputs "groff-minimal")
151 "/bin/preconv\""))))))
152 #:configure-flags
153 #~(cons*
154 ;; Disable setuid man user.
155 "--disable-setuid"
156 ;; Don't constrain ownership of system-wide cache files.
157 ;; Otherwise creating the manpage database fails with
158 ;; man-db > 2.7.5.
159 "--disable-cache-owner"
160 (string-append "--with-pager="
161 (search-input-file %build-inputs "bin/less"))
162 (string-append "--with-gzip="
163 (search-input-file %build-inputs "bin/gzip"))
164 (string-append "--with-bzip2="
165 (search-input-file %build-inputs "bin/bzip2"))
166 (string-append "--with-xz="
167 (search-input-file %build-inputs "bin/xz"))
168 (string-append "--with-zstd="
169 (search-input-file %build-inputs "bin/zstd"))
170 (string-append "--with-col="
171 (search-input-file %build-inputs "bin/col"))
172 ;; The default systemd directories ignore --prefix.
173 (string-append "--with-systemdsystemunitdir="
174 #$output "/lib/systemd/system")
175 (string-append "--with-systemdtmpfilesdir="
176 #$output "/lib/tmpfiles.d")
177 (map (lambda (prog)
178 (string-append
179 "--with-" prog "="
180 #$(this-package-input "groff-minimal")
181 (string-append "/bin/" prog)))
182 '("nroff" "eqn" "neqn" "tbl" "refer" "pic")))
183 ;; At run time we should refer to GROFF-MINIMAL, not GROFF (the latter
184 ;; pulls in Perl.)
185 #:disallowed-references (list (this-package-native-input "groff"))))
186 (native-inputs
187 (list pkg-config flex
188 ;; Groff is needed at build time for troff, grops, soelim, etc.
189 groff))
190 (inputs
191 (append
192 (list gdbm
193 groff-minimal
194 less
195 libpipeline)
196 (if (target-linux?)
197 (list libseccomp)
198 '())
199 (list util-linux
200 zstd)))
201 (native-search-paths
202 (list (search-path-specification
203 (variable "MANPATH")
204 (files '("share/man")))))
205 (home-page "https://man-db.nongnu.org/")
206 (synopsis "Standard Unix documentation system")
207 (description
208 "Man-db is an implementation of the standard Unix documentation system
209accessed using the man command. It uses a Berkeley DB database in place of
210the traditional flat-text whatis databases.")
211 (license license:gpl2+)))
212
213(define-public man2html
214 (package
215 (name "man2html")
216 (version "1.6g-16")
217 (source (origin
218 (method git-fetch)
219 (uri (git-reference
220 (url "https://salsa.debian.org/debian/man2html")
221 (commit (string-append "debian/" version))))
222 (file-name (git-file-name name version))
223 (sha256
224 (base32
225 "1cxm8b2x4cjmyidi4gfz9q29zrhaxhbnsiqcmlnyr1bdhjsmk786"))))
226 (build-system gnu-build-system)
227 (arguments
228 (list
229 #:tests? #f ;no test suite
230 ;; The source include a man page viewer as well as the man2html
231 ;; converter. We're only interested in the converter, so we specify the
232 ;; explicit 'manhtml' target.
233 #:make-flags #~(list (string-append "bindir=" #$output "/bin")
234 "manhtml")
235 #:phases #~(modify-phases %standard-phases
236 (add-before 'configure 'fix-includes
237 (lambda _
238 (substitute* "src/makemsg.c"
239 (("#include <unistd.h>" all)
240 (string-append all "\n#include <string.h>")))))
241 (replace 'configure
242 (lambda _
243 (setenv "CC" #$(cc-for-target))
244 (invoke "./configure"
245 (string-append "-prefix=" #$output))))
246 (add-before 'install 'chdir
247 (lambda _
248 (chdir "man2html")))
249 (replace 'install
250 ;; This is needed because the 'manhtml' top level target
251 ;; doesn't exist in man2html/Makefile.
252 (lambda* (#:key make-flags #:allow-other-keys
253 #:rest args)
254 (apply (assoc-ref %standard-phases 'install)
255 `(,@args #:make-flags
256 ,(delete "manhtml" make-flags))))))))
257 (home-page "https://salsa.debian.org/debian/man2html")
258 (synopsis "Man pages to HTML format converter")
259 (description "@command{man2html} is a command-line tool for converting man
260pages into HTML format.")
261 (license license:gpl2+)))
262
263(define-public mandoc
264 (package
265 (name "mandoc")
266 (version "1.14.6")
267 (source (origin
268 (method url-fetch)
269 (uri (string-append "https://mandoc.bsd.lv/snapshots/mandoc-"
270 version ".tar.gz"))
271 (patches (search-patches "mandoc-support-zstd-compression.patch"))
272 (sha256
273 (base32
274 "174x2x9ws47b14lm339j6rzm7mxy1j3qhh484khscw0yy1qdbw4b"))))
275 (build-system gnu-build-system)
276 (arguments
277 (list
278 #:test-target "regress"
279 #:make-flags
280 #~(list "VPATH=./zstd-src/zlibWrapper"
281 (string-join
282 (list "CFLAGS=-DZWRAP_USE_ZSTD=1"
283 "-I./zstd-src/zlibWrapper")
284 " "))
285 #:phases
286 #~(modify-phases %standard-phases
287 (add-after 'unpack 'unpack-zstd
288 (lambda _
289 (mkdir "zstd-src")
290 (invoke "tar" "--strip-components=1" "-C"
291 "zstd-src" "-xf" #$(package-source zstd))))
292 (add-before 'configure 'set-prefix
293 (lambda* (#:key outputs #:allow-other-keys)
294 (substitute*
295 "configure"
296 (("^CC=.*")
297 (string-append "CC=" #$(cc-for-target) "\n"))
298 (("^DEFCFLAGS=\\\\\"")
299 "DEFCFLAGS=\"-O2 ")
300 (("^UTF8_LOCALE=.*") ;used for tests
301 "UTF8_LOCALE=en_US.UTF-8\n")
302 (("^MANPATH_(BASE|DEFAULT)=.*" _ which)
303 (string-append
304 "MANPATH_" which "="
305 "/run/current-system/profile/share/man\n"))
306 (("^PREFIX=.*")
307 (string-append "PREFIX="
308 (assoc-ref outputs "out")
309 "\n"))))))))
310 (native-inputs (list (libc-utf8-locales-for-target) perl)) ;used to run tests
311 (inputs (list zlib (list zstd "lib")))
312 (native-search-paths
313 (list (search-path-specification
314 (variable "MANPATH")
315 (files '("share/man")))))
316 (synopsis "Tools for BSD mdoc and man pages")
317 (description
318 "mandoc is a suite of tools compiling mdoc, the roff macro language of
319choice for BSD manual pages, and man, the predominant historical language for
320UNIX manuals. It is small and quite fast. The main component of the toolset
321is the @command{mandoc} utility program, based on the libmandoc validating
322compiler, to format output for UTF-8 and ASCII UNIX terminals, HTML 5,
323PostScript, and PDF. Additional tools include the @command{man} viewer, and
324@command{apropos} and @command{whatis}.")
325 (home-page "https://mandoc.bsd.lv/")
326 (license license:isc)))
327
328(define-public man-pages
329 (package
330 (name "man-pages")
331 (version "6.18")
332 (source
333 (origin
334 (method url-fetch)
335 (uri
336 (list (string-append "mirror://kernel.org/linux/docs/man-pages/"
337 "man-pages-" version ".tar.xz")
338 (string-append "mirror://kernel.org/linux/docs/man-pages/Archive/"
339 "man-pages-" version ".tar.xz")))
340 (sha256
341 (base32 "1l949fvqikf88qjxbp1wny185prd3mcgcd3s49l8qx2rigfgld69"))))
342 (build-system gnu-build-system)
343 (arguments
344 (list
345 #:phases
346 #~(modify-phases %standard-phases
347 (add-after 'unpack 'skip-html
348 ;; As of 6.00, this package tries to convert man pages to HTML with
349 ;; man2html. The only Guix package currently providing that script
350 ;; is man-for-txr, but that version seems unable to handle relative
351 ;; ‘.so’ statements properly. Disable HTML generation.
352 (lambda _
353 (substitute* "share/mk/build/html/_.mk"
354 (("(html:) .*" _ target) (string-append target "\n")))))
355 (delete 'configure))
356
357 ;; The 'all' target depends on three targets that directly populate
358 ;; $(MANDIR) based on its current contents. Doing that in parallel
359 ;; leads to undefined behavior (see <http://bugs.gnu.org/18701>.)
360 #:parallel-build? #f
361
362 #:tests? #f
363 #:make-flags
364 #~(list "-R" (string-append "mandir=" #$output "/share/man"))))
365 (home-page "https://www.kernel.org/doc/man-pages/")
366 (synopsis "Development manual pages from the Linux project")
367 (description
368 "This package provides traditional Unix \"man pages\" documenting the
369Linux kernel and C library interfaces employed by user-space programs.")
370
371 ;; Each man page has its own license; some are GPLv2+, some are MIT/X11.
372 (license license:gpl2+)))
373
374(define-public man-pages-posix
375 (package
376 (name "man-pages-posix")
377 ;; Make sure that updates are still legally distributable. 2017-a is not.
378 (version "2013-a")
379 (source
380 (origin
381 (method url-fetch)
382 (uri (string-append "mirror://kernel.org/linux/docs/man-pages/"
383 "man-pages-posix/man-pages-posix-" version
384 ".tar.xz"))
385 (sha256
386 (base32 "0258j05zdrxpgdj8nndbyi7bvrs8fxdksb0xbfrylzgzfmf3lqqr"))))
387 (build-system gnu-build-system)
388 (arguments
389 `(#:tests? #f
390 #:make-flags ,#~(list (string-append "prefix=" #$output))
391 #:license-file-regexp "POSIX-COPYRIGHT"
392 ;; The build phase only compresses documentation, which we already do.
393 #:phases (modify-phases %standard-phases (delete 'configure)
394 (delete 'build))))
395 (home-page "https://www.kernel.org/doc/man-pages/")
396 (synopsis "Man pages from the POSIX.1-2013 standard")
397 (description
398 "This package provides excerpts from the POSIX.1-2008 and TC1 standards
399(collectively, POSIX.1-2013) in manual page form. While the Linux man-pages
400project documents the system as it exists on Linux- and glibc-based systems,
401this package documents the portable software API as nominally implemented by
402many Unix-likes.")
403 (license (license:fsdg-compatible "file://POSIX-COPYRIGHT"
404 "Redistribution of this material is permitted so long as this
405notice and the corresponding notices within each POSIX manual page are retained
406on any distribution, and the nroff source is included."))))
407
408(define-public help2man
409 ;; TODO: Manual pages for languages not available from the implicit
410 ;; input "locales" contain the original (English) text.
411 (package
412 (name "help2man")
413 (version "1.49.2")
414 (source
415 (origin
416 (method url-fetch)
417 (uri (string-append "mirror://gnu/help2man/help2man-"
418 version ".tar.xz"))
419 (sha256
420 (base32
421 "0dnxx96lbcb8ab8yrdkqll14cl5n0bch8qpd9qj3c2ky78hhwbly"))))
422 (build-system gnu-build-system)
423 (arguments
424 (list
425 #:tests? #f ;no `check' target
426 #:phases
427 #~(modify-phases %standard-phases
428 (add-after 'unpack 'patch-help2man-with-perl-gettext
429 (lambda* (#:key inputs #:allow-other-keys)
430 (let ((lib #$(this-package-input "perl-gettext"))
431 (fmt "use lib '~a/lib/perl5/site_perl';~%~a"))
432 (substitute* "help2man.PL"
433 (("^use Locale::gettext.*$" load)
434 (format #f fmt lib load)))))))))
435 (inputs
436 (append
437 (list perl)
438 (if (%current-target-system)
439 '()
440 (list perl-gettext))))
441 (native-inputs
442 (list perl gettext-minimal))
443 (home-page "https://www.gnu.org/software/help2man/")
444 (synopsis "Automatically generate man pages from program --help")
445 (description
446 "GNU help2man is a program that converts the output of standard
447\"--help\" and \"--version\" command-line arguments into a manual page
448automatically.")
449 (license license:gpl3+)))
450
451(define-public qman
452 (package
453 (name "qman")
454 (version "1.5.1")
455 (source
456 (origin
457 (method git-fetch)
458 (uri (git-reference
459 (url "https://github.com/plp13/qman")
460 (commit (string-append "v" version))))
461 (file-name (git-file-name name version))
462 (sha256
463 (base32 "0q1g1fvipfk8vw432xiwm12rjb1hlyhmb6x6y99qc28wpinhnwng"))))
464 (build-system meson-build-system)
465 (arguments
466 (list
467 #:out-of-source? #t
468 #:configure-flags
469 #~(list "-Dconfigdir=etc/xdg/qman")
470 #:phases
471 #~(modify-phases %standard-phases
472 (add-after 'unpack 'patch-paths
473 (lambda _
474 (substitute* '("src/config_def.py"
475 "man/qman.1")
476 (("\\/usr\\/bin\\/man")
477 (string-append #$(this-package-input "man-db")
478 "/bin/man"))
479 (("\\/usr\\/bin\\/groff")
480 (string-append #$(this-package-input "groff")
481 "/bin/groff"))
482 (("\\/usr\\/bin\\/whatis")
483 (string-append #$(this-package-input "man-db")
484 "/bin/whatis"))
485 (("\\/usr\\/bin\\/apropos")
486 (string-append #$(this-package-input "man-db")
487 "/bin/apropos"))
488 (("\\/usr\\/bin\\/xdg\\\\-open")
489 (string-append #$(this-package-input "xdg-utils")
490 "/bin/xdg\\-open"))
491 (("\\/usr\\/bin\\/xdg\\\\-email")
492 (string-append #$(this-package-input "xdg-utils")
493 "/bin/xdg\\-email"))))))))
494 (native-inputs
495 (list cmake-minimal
496 pkg-config))
497 (inputs
498 (list cunit
499 groff
500 man-db
501 ncurses
502 python-cogapp
503 xdg-utils
504 zlib))
505 (home-page "https://github.com/plp13/qman")
506 (synopsis "Modern man page viewer for terminals")
507 (description
508 "@code{qman} is a modern, full-featured manual page viewer featuring
509hyperlinks,web browser like navigation, a table of contents for each page,
510incremental search, on-line help, and more. It also strives to be fast and
511tiny, so that it can be used everywhere.
512
513Features:
514@itemize
515@item Index page that displays all manual pages available on the system,
516sorted alphabetically and organised by section
517@item Pages for apropos and whatis results
518@item Hyperlinks to other manual pages
519@item Hyperlinks for URLs and email addresses
520@item Hyperlinks to files or directories in the local filesystem
521@item In-page hyperlinks
522@item A table of contents for each manual page
523@item Incremental search for manual pages
524@item Incremental free page text search
525@item Command-line options similar to those of man (most importantly, -k and
526-f)
527@item Keyboard mappings similar to those of less
528@item Mouse support
529@item Navigation history
530@item On-line help
531@item Fully configurable using INI-style config files
532@item Manual page
533@end itemize")
534 (license license:bsd-2)))
535
536(define-public scdoc
537 (package
538 (name "scdoc")
539 (version "1.11.4")
540 (source
541 (origin
542 (method git-fetch)
543 (uri (git-reference
544 (url "https://git.sr.ht/~sircmpwn/scdoc")
545 (commit version)))
546 (file-name (git-file-name name version))
547 (sha256
548 (base32 "17jv62n874ynhc4fdzmdhid89lxcv1s17p2h1k5f50g268gl4mw2"))))
549 (build-system gnu-build-system)
550 (arguments
551 `(#:make-flags
552 (list (string-append "CC=" ,(cc-for-target))
553 (string-append "PREFIX=" (assoc-ref %outputs "out")))
554 #:phases
555 (modify-phases %standard-phases
556 (delete 'configure))))
557 (home-page "https://git.sr.ht/~sircmpwn/scdoc")
558 (synopsis "Simple man page generator")
559 (description "scdoc is a simple man page generator written for POSIX systems
560in C99.")
561 ;; MIT license, see /share/doc/scdoc-1.6.0/COPYING.
562 (license license:expat)))
563
564(define-public txt2man
565 (package
566 (name "txt2man")
567 (version "1.6.0")
568 (source
569 (origin
570 (method git-fetch)
571 (uri (git-reference
572 (url "https://github.com/mvertes/txt2man")
573 (commit (string-append "txt2man-" version))))
574 (file-name (git-file-name name version))
575 (sha256
576 (base32
577 "1razjpvlcp85hqli77mwr9nmn5jnv3lm1fxbbqjpx1brv3h1lvm5"))))
578 (build-system gnu-build-system)
579 (arguments
580 `(#:tests? #f ; no "check" target
581 #:make-flags (list (string-append "prefix=" (assoc-ref %outputs "out")))
582 #:phases (modify-phases %standard-phases (delete 'configure))))
583 (inputs
584 (list gawk))
585 (home-page "https://github.com/mvertes/txt2man")
586 (synopsis "Convert text to man page")
587 (description "Txt2man converts flat ASCII text to man page format.")
588 (license license:gpl2+)))
589
590(define-public stdman
591 ;; Stdman generates the man files from "html-book-YYYYMMDD.tar.xz" asset in
592 ;; <https://github.com/PeterFeicht/cppreference-doc> repository, which is an
593 ;; unofficial archive of <https://en.cppreference.com>.
594 ;;
595 ;; There are therefore two versions to consider: one for the tool, and one
596 ;; for the source. Use the latter for the package as a whole, and let-bind
597 ;; the former.
598 (let ((stdman-version "2024.07.05"))
599 (package
600 (name "stdman")
601 (version "20240610")
602 (source (origin
603 (method git-fetch)
604 (uri (git-reference
605 (url "https://github.com/jeaye/stdman")
606 (commit stdman-version)))
607 (file-name (git-file-name name version))
608 (sha256
609 (base32
610 "0h1gfw4sxic5gx073zmshg4qyz2g142ckgzyj30pk8j708mnl8pz"))))
611 (build-system gnu-build-system)
612 (arguments
613 (list #:tests? #false ;no tests
614 #:configure-flags #~(list (string-append "--prefix=" #$output))
615 #:phases
616 #~(modify-phases %standard-phases
617 (add-after 'unpack 'reproducible-build
618 ;; Out of the box, executable's "version" results from
619 ;; a call to `date'. Since the string is going to appear
620 ;; in every man page, refer to the documentation version.
621 (lambda _
622 (substitute* "Makefile.in"
623 (("(STDMAN_VERSION=).*" _ prefix)
624 (string-append prefix #$version "\n")))))
625 (add-after 'unpack 'unpack-html-source
626 (lambda _
627 (let ((reference
628 #$(this-package-native-input
629 (string-append "html-book-" version ".tar.xz"))))
630 (invoke "tar" "xvJf" reference))))
631 (replace 'build
632 (lambda _
633 ;; Elinks insists on creating its configuration in HOME.
634 (setenv "HOME" (getcwd))
635 (invoke "make" "generate"))))))
636 (native-inputs
637 (list curl
638 elinks
639 which
640 (origin
641 (method url-fetch)
642 (uri
643 (string-append
644 "https://github.com/PeterFeicht/cppreference-doc/"
645 "releases/download/v" version "/"
646 "html-book-" version ".tar.xz"))
647 (file-name (string-append "html-book-" version ".tar.xz"))
648 (sha256
649 (base32
650 "0qa7d2bida65c00z5awa99jrwr4gvxdpc3xp9r6hkxppxaji495w")))))
651 (home-page "https://github.com/jeaye/stdman")
652 (synopsis "Formatted C++ @code{stdlib} man pages from cppreference")
653 (description
654 "Stdman is a tool that provides C++ @code{stdlib} documentation
655archived from @url{https://en.cppreference.com, cppreference} as
656Groff-formated man pages, accessible from the @command{man} command.")
657 (license license:expat))))