projects/guix·blob python-team · refs

662 lines · 27.3 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 inputs outputs #:allow-other-keys)
294 (substitute*
295 "configure"
296 (("^CC=.*")
297 (string-append "CC=" #$(cc-for-target) "\n"))
298 (("^BINM_PAGER=.*")
299 (string-append "BINM_PAGER="
300 (search-input-file inputs "/bin/less")
301 "\n"))
302 (("^HAVE_LESS_T=.*") "HAVE_LESS_T=1\n")
303 (("^DEFCFLAGS=\\\\\"")
304 "DEFCFLAGS=\"-O2 ")
305 (("^UTF8_LOCALE=.*") ;used for tests
306 "UTF8_LOCALE=en_US.UTF-8\n")
307 (("^MANPATH_(BASE|DEFAULT)=.*" _ which)
308 (string-append
309 "MANPATH_" which "="
310 "/run/current-system/profile/share/man\n"))
311 (("^PREFIX=.*")
312 (string-append "PREFIX="
313 (assoc-ref outputs "out")
314 "\n"))))))))
315 (native-inputs (list (libc-utf8-locales-for-target) perl)) ;used to run tests
316 (inputs (list less zlib (list zstd "lib")))
317 (native-search-paths
318 (list (search-path-specification
319 (variable "MANPATH")
320 (files '("share/man")))))
321 (synopsis "Tools for BSD mdoc and man pages")
322 (description
323 "mandoc is a suite of tools compiling mdoc, the roff macro language of
324choice for BSD manual pages, and man, the predominant historical language for
325UNIX manuals. It is small and quite fast. The main component of the toolset
326is the @command{mandoc} utility program, based on the libmandoc validating
327compiler, to format output for UTF-8 and ASCII UNIX terminals, HTML 5,
328PostScript, and PDF. Additional tools include the @command{man} viewer, and
329@command{apropos} and @command{whatis}.")
330 (home-page "https://mandoc.bsd.lv/")
331 (license license:isc)))
332
333(define-public man-pages
334 (package
335 (name "man-pages")
336 (version "6.18")
337 (source
338 (origin
339 (method url-fetch)
340 (uri
341 (list (string-append "mirror://kernel.org/linux/docs/man-pages/"
342 "man-pages-" version ".tar.xz")
343 (string-append "mirror://kernel.org/linux/docs/man-pages/Archive/"
344 "man-pages-" version ".tar.xz")))
345 (sha256
346 (base32 "1l949fvqikf88qjxbp1wny185prd3mcgcd3s49l8qx2rigfgld69"))))
347 (build-system gnu-build-system)
348 (arguments
349 (list
350 #:phases
351 #~(modify-phases %standard-phases
352 (add-after 'unpack 'skip-html
353 ;; As of 6.00, this package tries to convert man pages to HTML with
354 ;; man2html. The only Guix package currently providing that script
355 ;; is man-for-txr, but that version seems unable to handle relative
356 ;; ‘.so’ statements properly. Disable HTML generation.
357 (lambda _
358 (substitute* "share/mk/build/html/_.mk"
359 (("(html:) .*" _ target) (string-append target "\n")))))
360 (delete 'configure))
361
362 ;; The 'all' target depends on three targets that directly populate
363 ;; $(MANDIR) based on its current contents. Doing that in parallel
364 ;; leads to undefined behavior (see <http://bugs.gnu.org/18701>.)
365 #:parallel-build? #f
366
367 #:tests? #f
368 #:make-flags
369 #~(list "-R" (string-append "mandir=" #$output "/share/man"))))
370 (home-page "https://www.kernel.org/doc/man-pages/")
371 (synopsis "Development manual pages from the Linux project")
372 (description
373 "This package provides traditional Unix \"man pages\" documenting the
374Linux kernel and C library interfaces employed by user-space programs.")
375
376 ;; Each man page has its own license; some are GPLv2+, some are MIT/X11.
377 (license license:gpl2+)))
378
379(define-public man-pages-posix
380 (package
381 (name "man-pages-posix")
382 ;; Make sure that updates are still legally distributable. 2017-a is not.
383 (version "2013-a")
384 (source
385 (origin
386 (method url-fetch)
387 (uri (string-append "mirror://kernel.org/linux/docs/man-pages/"
388 "man-pages-posix/man-pages-posix-" version
389 ".tar.xz"))
390 (sha256
391 (base32 "0258j05zdrxpgdj8nndbyi7bvrs8fxdksb0xbfrylzgzfmf3lqqr"))))
392 (build-system gnu-build-system)
393 (arguments
394 `(#:tests? #f
395 #:make-flags ,#~(list (string-append "prefix=" #$output))
396 #:license-file-regexp "POSIX-COPYRIGHT"
397 ;; The build phase only compresses documentation, which we already do.
398 #:phases (modify-phases %standard-phases (delete 'configure)
399 (delete 'build))))
400 (home-page "https://www.kernel.org/doc/man-pages/")
401 (synopsis "Man pages from the POSIX.1-2013 standard")
402 (description
403 "This package provides excerpts from the POSIX.1-2008 and TC1 standards
404(collectively, POSIX.1-2013) in manual page form. While the Linux man-pages
405project documents the system as it exists on Linux- and glibc-based systems,
406this package documents the portable software API as nominally implemented by
407many Unix-likes.")
408 (license (license:fsdg-compatible "file://POSIX-COPYRIGHT"
409 "Redistribution of this material is permitted so long as this
410notice and the corresponding notices within each POSIX manual page are retained
411on any distribution, and the nroff source is included."))))
412
413(define-public help2man
414 ;; TODO: Manual pages for languages not available from the implicit
415 ;; input "locales" contain the original (English) text.
416 (package
417 (name "help2man")
418 (version "1.49.2")
419 (source
420 (origin
421 (method url-fetch)
422 (uri (string-append "mirror://gnu/help2man/help2man-"
423 version ".tar.xz"))
424 (sha256
425 (base32
426 "0dnxx96lbcb8ab8yrdkqll14cl5n0bch8qpd9qj3c2ky78hhwbly"))))
427 (build-system gnu-build-system)
428 (arguments
429 (list
430 #:tests? #f ;no `check' target
431 #:phases
432 #~(modify-phases %standard-phases
433 (add-after 'unpack 'patch-help2man-with-perl-gettext
434 (lambda* (#:key inputs #:allow-other-keys)
435 (let ((lib #$(this-package-input "perl-gettext"))
436 (fmt "use lib '~a/lib/perl5/site_perl';~%~a"))
437 (substitute* "help2man.PL"
438 (("^use Locale::gettext.*$" load)
439 (format #f fmt lib load)))))))))
440 (inputs
441 (append
442 (list perl)
443 (if (%current-target-system)
444 '()
445 (list perl-gettext))))
446 (native-inputs
447 (list perl gettext-minimal))
448 (home-page "https://www.gnu.org/software/help2man/")
449 (synopsis "Automatically generate man pages from program --help")
450 (description
451 "GNU help2man is a program that converts the output of standard
452\"--help\" and \"--version\" command-line arguments into a manual page
453automatically.")
454 (license license:gpl3+)))
455
456(define-public qman
457 (package
458 (name "qman")
459 (version "1.5.1")
460 (source
461 (origin
462 (method git-fetch)
463 (uri (git-reference
464 (url "https://github.com/plp13/qman")
465 (commit (string-append "v" version))))
466 (file-name (git-file-name name version))
467 (sha256
468 (base32 "0q1g1fvipfk8vw432xiwm12rjb1hlyhmb6x6y99qc28wpinhnwng"))))
469 (build-system meson-build-system)
470 (arguments
471 (list
472 #:out-of-source? #t
473 #:configure-flags
474 #~(list "-Dconfigdir=etc/xdg/qman")
475 #:phases
476 #~(modify-phases %standard-phases
477 (add-after 'unpack 'patch-paths
478 (lambda _
479 (substitute* '("src/config_def.py"
480 "man/qman.1")
481 (("\\/usr\\/bin\\/man")
482 (string-append #$(this-package-input "man-db")
483 "/bin/man"))
484 (("\\/usr\\/bin\\/groff")
485 (string-append #$(this-package-input "groff")
486 "/bin/groff"))
487 (("\\/usr\\/bin\\/whatis")
488 (string-append #$(this-package-input "man-db")
489 "/bin/whatis"))
490 (("\\/usr\\/bin\\/apropos")
491 (string-append #$(this-package-input "man-db")
492 "/bin/apropos"))
493 (("\\/usr\\/bin\\/xdg\\\\-open")
494 (string-append #$(this-package-input "xdg-utils")
495 "/bin/xdg\\-open"))
496 (("\\/usr\\/bin\\/xdg\\\\-email")
497 (string-append #$(this-package-input "xdg-utils")
498 "/bin/xdg\\-email"))))))))
499 (native-inputs
500 (list cmake-minimal
501 pkg-config))
502 (inputs
503 (list cunit
504 groff
505 man-db
506 ncurses
507 python-cogapp
508 xdg-utils
509 zlib))
510 (home-page "https://github.com/plp13/qman")
511 (synopsis "Modern man page viewer for terminals")
512 (description
513 "@code{qman} is a modern, full-featured manual page viewer featuring
514hyperlinks,web browser like navigation, a table of contents for each page,
515incremental search, on-line help, and more. It also strives to be fast and
516tiny, so that it can be used everywhere.
517
518Features:
519@itemize
520@item Index page that displays all manual pages available on the system,
521sorted alphabetically and organised by section
522@item Pages for apropos and whatis results
523@item Hyperlinks to other manual pages
524@item Hyperlinks for URLs and email addresses
525@item Hyperlinks to files or directories in the local filesystem
526@item In-page hyperlinks
527@item A table of contents for each manual page
528@item Incremental search for manual pages
529@item Incremental free page text search
530@item Command-line options similar to those of man (most importantly, -k and
531-f)
532@item Keyboard mappings similar to those of less
533@item Mouse support
534@item Navigation history
535@item On-line help
536@item Fully configurable using INI-style config files
537@item Manual page
538@end itemize")
539 (license license:bsd-2)))
540
541(define-public scdoc
542 (package
543 (name "scdoc")
544 (version "1.11.5")
545 (source
546 (origin
547 (method git-fetch)
548 (uri (git-reference
549 (url "https://git.sr.ht/~sircmpwn/scdoc")
550 (commit version)))
551 (file-name (git-file-name name version))
552 (sha256
553 (base32 "1jhjkp0bk16pb5ry7pjwyif9lk0phinrs1r6mw9waqdyp5mrydjf"))))
554 (build-system gnu-build-system)
555 (arguments
556 `(#:make-flags
557 (list (string-append "CC=" ,(cc-for-target))
558 (string-append "PREFIX=" (assoc-ref %outputs "out")))
559 #:phases
560 (modify-phases %standard-phases
561 (delete 'configure))))
562 (home-page "https://git.sr.ht/~sircmpwn/scdoc")
563 (synopsis "Simple man page generator")
564 (description "scdoc is a simple man page generator written for POSIX systems
565in C99.")
566 ;; MIT license, see /share/doc/scdoc-1.6.0/COPYING.
567 (license license:expat)))
568
569(define-public txt2man
570 (package
571 (name "txt2man")
572 (version "1.6.0")
573 (source
574 (origin
575 (method git-fetch)
576 (uri (git-reference
577 (url "https://github.com/mvertes/txt2man")
578 (commit (string-append "txt2man-" version))))
579 (file-name (git-file-name name version))
580 (sha256
581 (base32
582 "1razjpvlcp85hqli77mwr9nmn5jnv3lm1fxbbqjpx1brv3h1lvm5"))))
583 (build-system gnu-build-system)
584 (arguments
585 `(#:tests? #f ; no "check" target
586 #:make-flags (list (string-append "prefix=" (assoc-ref %outputs "out")))
587 #:phases (modify-phases %standard-phases (delete 'configure))))
588 (inputs
589 (list gawk))
590 (home-page "https://github.com/mvertes/txt2man")
591 (synopsis "Convert text to man page")
592 (description "Txt2man converts flat ASCII text to man page format.")
593 (license license:gpl2+)))
594
595(define-public stdman
596 ;; Stdman generates the man files from "html-book-YYYYMMDD.tar.xz" asset in
597 ;; <https://github.com/PeterFeicht/cppreference-doc> repository, which is an
598 ;; unofficial archive of <https://en.cppreference.com>.
599 ;;
600 ;; There are therefore two versions to consider: one for the tool, and one
601 ;; for the source. Use the latter for the package as a whole, and let-bind
602 ;; the former.
603 (let ((stdman-version "2024.07.05"))
604 (package
605 (name "stdman")
606 (version "20240610")
607 (source (origin
608 (method git-fetch)
609 (uri (git-reference
610 (url "https://github.com/jeaye/stdman")
611 (commit stdman-version)))
612 (file-name (git-file-name name version))
613 (sha256
614 (base32
615 "0h1gfw4sxic5gx073zmshg4qyz2g142ckgzyj30pk8j708mnl8pz"))))
616 (build-system gnu-build-system)
617 (arguments
618 (list #:tests? #false ;no tests
619 #:configure-flags #~(list (string-append "--prefix=" #$output))
620 #:phases
621 #~(modify-phases %standard-phases
622 (add-after 'unpack 'reproducible-build
623 ;; Out of the box, executable's "version" results from
624 ;; a call to `date'. Since the string is going to appear
625 ;; in every man page, refer to the documentation version.
626 (lambda _
627 (substitute* "Makefile.in"
628 (("(STDMAN_VERSION=).*" _ prefix)
629 (string-append prefix #$version "\n")))))
630 (add-after 'unpack 'unpack-html-source
631 (lambda _
632 (let ((reference
633 #$(this-package-native-input
634 (string-append "html-book-" version ".tar.xz"))))
635 (invoke "tar" "xvJf" reference))))
636 (replace 'build
637 (lambda _
638 ;; Elinks insists on creating its configuration in HOME.
639 (setenv "HOME" (getcwd))
640 (invoke "make" "generate"))))))
641 (native-inputs
642 (list curl
643 elinks
644 which
645 (origin
646 (method url-fetch)
647 (uri
648 (string-append
649 "https://github.com/PeterFeicht/cppreference-doc/"
650 "releases/download/v" version "/"
651 "html-book-" version ".tar.xz"))
652 (file-name (string-append "html-book-" version ".tar.xz"))
653 (sha256
654 (base32
655 "0qa7d2bida65c00z5awa99jrwr4gvxdpc3xp9r6hkxppxaji495w")))))
656 (home-page "https://github.com/jeaye/stdman")
657 (synopsis "Formatted C++ @code{stdlib} man pages from cppreference")
658 (description
659 "Stdman is a tool that provides C++ @code{stdlib} documentation
660archived from @url{https://en.cppreference.com, cppreference} as
661Groff-formated man pages, accessible from the @command{man} command.")
662 (license license:expat))))