| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 | |
| 26 | |
| 27 | |
| 28 | |
| 29 | |
| 30 | |
| 31 | |
| 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 |
| 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
|
| 90 | to man pages in groff format or html. It features the usual man page items such
|
| 91 | as 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
|
| 112 | a 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 | |
| 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 | |
| 145 | |
| 146 | |
| 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 | |
| 155 | "--disable-setuid"
|
| 156 | |
| 157 | |
| 158 | |
| 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 | |
| 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 | |
| 184 | |
| 185 | #:disallowed-references (list (this-package-native-input "groff"))))
|
| 186 | (native-inputs
|
| 187 | (list pkg-config flex
|
| 188 | |
| 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
|
| 209 | accessed using the man command. It uses a Berkeley DB database in place of
|
| 210 | the 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 |
| 230 | |
| 231 | |
| 232 | |
| 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 | |
| 251 | |
| 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
|
| 260 | pages 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=.*") |
| 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)) |
| 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
|
| 319 | choice for BSD manual pages, and man, the predominant historical language for
|
| 320 | UNIX manuals. It is small and quite fast. The main component of the toolset
|
| 321 | is the @command{mandoc} utility program, based on the libmandoc validating
|
| 322 | compiler, to format output for UTF-8 and ASCII UNIX terminals, HTML 5,
|
| 323 | PostScript, 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 | |
| 349 | |
| 350 | |
| 351 | |
| 352 | (lambda _
|
| 353 | (substitute* "share/mk/build/html/_.mk"
|
| 354 | (("(html:) .*" _ target) (string-append target "\n")))))
|
| 355 | (delete 'configure))
|
| 356 |
|
| 357 | |
| 358 | |
| 359 | |
| 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
|
| 369 | Linux kernel and C library interfaces employed by user-space programs.")
|
| 370 |
|
| 371 | |
| 372 | (license license:gpl2+)))
|
| 373 |
|
| 374 | (define-public man-pages-posix
|
| 375 | (package
|
| 376 | (name "man-pages-posix")
|
| 377 | |
| 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 | |
| 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
|
| 400 | project documents the system as it exists on Linux- and glibc-based systems,
|
| 401 | this package documents the portable software API as nominally implemented by
|
| 402 | many Unix-likes.")
|
| 403 | (license (license:fsdg-compatible "file://POSIX-COPYRIGHT"
|
| 404 | "Redistribution of this material is permitted so long as this
|
| 405 | notice and the corresponding notices within each POSIX manual page are retained
|
| 406 | on any distribution, and the nroff source is included."))))
|
| 407 |
|
| 408 | (define-public help2man
|
| 409 | |
| 410 | |
| 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 |
| 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
|
| 448 | automatically.")
|
| 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
|
| 509 | hyperlinks,web browser like navigation, a table of contents for each page,
|
| 510 | incremental search, on-line help, and more. It also strives to be fast and
|
| 511 | tiny, so that it can be used everywhere.
|
| 512 |
|
| 513 | Features:
|
| 514 | @itemize
|
| 515 | @item Index page that displays all manual pages available on the system,
|
| 516 | sorted 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
|
| 560 | in C99.")
|
| 561 | |
| 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 |
| 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 | |
| 592 | |
| 593 | |
| 594 | |
| 595 | |
| 596 | |
| 597 | |
| 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 |
| 614 | #:configure-flags #~(list (string-append "--prefix=" #$output))
|
| 615 | #:phases
|
| 616 | #~(modify-phases %standard-phases
|
| 617 | (add-after 'unpack 'reproducible-build
|
| 618 | |
| 619 | |
| 620 | |
| 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 | |
| 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
|
| 655 | archived from @url{https://en.cppreference.com, cppreference} as
|
| 656 | Groff-formated man pages, accessible from the @command{man} command.")
|
| 657 | (license license:expat))))
|