(define-module (xyz euandreh docs) #:use-module (gnu packages base) #:use-module (gnu packages compression) #:use-module (guix licenses) #:use-module (guix download) #:use-module (guix packages) #:use-module (guix build-system gnu) #:use-module (guix build-system trivial)) (define-public posix-man-pages (package (name "posix-man-pages") (version "2017-a") (source (origin (method url-fetch) (uri (string-append "mirror://kernel.org/linux/docs/man-pages/man-pages-posix/man-pages-posix-" version ".tar.xz")) (sha256 (base32 "1hwb65h9c7y8c69jiyhs0nphzisb7yl0br3jszd212q4nljvnryf")))) (build-system gnu-build-system) (arguments `(#:make-flags (list (string-append "prefix=" %output)) #:tests? #f #:phases (modify-phases %standard-phases (delete 'configure)))) (home-page "https://www.kernel.org/doc/man-pages/download.html") (synopsis "POSIX manual pages sections 0p, 1p and 3p") (description "This package provides the reference POSIX version of Unix \"man pages\" documenting the specification.") (license gpl2+))) ;; FIXME (define-public rfcs (package (name "rfcs") (version "singleton") (source (origin (method url-fetch) (uri "https://www.rfc-editor.org/in-notes/tar/RFC-all.tar.gz") (sha256 (base32 "0lhmvf1qsryf19pl9pk9k8431crq70xz5hcrlifs9srbr3ig3qkc")))) (build-system trivial-build-system) (native-inputs (list tar gzip)) (arguments `(#:modules ((guix build utils)) #:builder (begin (use-modules (guix build utils) (ice-9 string-fun)) (let* ((source (assoc-ref %build-inputs "source")) (tar (string-append (assoc-ref %build-inputs "tar") "/bin/tar")) (out (assoc-ref %outputs "out")) (man (string-append out "/share/man/man7rfc/"))) (setenv "PATH" (string-append (assoc-ref %build-inputs "gzip") "/bin")) (invoke tar "-xvf" source) (mkdir-p man) (define (rename-extension s) (string-replace-substring s ".txt" ".7rfc")) (for-each (lambda (f) (format #t "Copying file: ~a~%" f) (copy-file f (string-append man (rename-extension f)))) (find-files "." "^rfc[0-9]+.txt$")))))) (home-page "https://www.rfc-editor.org/") (synopsis "The RFC technical and organizational documents about the Internet") (description "This package provies reference RFC (Request For Comments) documents.") (license gpl2+))) ;; FIXME (list posix-man-pages rfcs)