summaryrefslogtreecommitdiff
path: root/gnu/packages/documentation.scm
diff options
context:
space:
mode:
authorChristina O'Donnell <cdo@mutix.org>2024-04-03 23:46:34 +0100
committerLudovic Courtès <ludo@gnu.org>2024-04-11 12:35:43 +0200
commitf607663864dc021ed9ac84a1b755f02201ccd359 (patch)
treee3978817114883019c46abe9cf869f0700c683f7 /gnu/packages/documentation.scm
parent8b65da6ac8ea5c0a5cb428e47b1bd8841ffef3fc (diff)
gnu: Add stddoc.
* gnu/packages/documentation.scm (stddoc): New variable. Change-Id: I0f60126ef78a45733ad7395352e9bad49561437b Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu/packages/documentation.scm')
-rw-r--r--gnu/packages/documentation.scm57
1 files changed, 57 insertions, 0 deletions
diff --git a/gnu/packages/documentation.scm b/gnu/packages/documentation.scm
index 507a326f6e5..12fbaf1d0c2 100644
--- a/gnu/packages/documentation.scm
+++ b/gnu/packages/documentation.scm
@@ -521,3 +521,60 @@ markdeep/latest/markdeep\\.min\\.js\\?\"></script>")
521be displayed in any web browser, whether local or remote. It supports diagrams, 521be displayed in any web browser, whether local or remote. It supports diagrams,
522calendars, equations, and other features as extensions of Markdown syntax.") 522calendars, equations, and other features as extensions of Markdown syntax.")
523 (license license:bsd-2))) 523 (license license:bsd-2)))
524
525(define-public stddoc
526 (let ((commit "6eef9deaf2e36bae812f50e448a8012b3e5efb14")
527 (revision "1"))
528 (package
529 (name "stddoc")
530 (version (git-version "1.0.2" revision commit))
531 (home-page "https://github.com/r-lyeh/stddoc.c")
532 (source
533 (origin
534 (method git-fetch)
535 (uri (git-reference
536 (url home-page)
537 (commit commit)))
538 (file-name (git-file-name name version))
539 (sha256
540 (base32 "06phjp7wbf4x1sagxwfapgv6iyiixmijxxbg2clb48kyvjg5mlwn"))
541 (snippet #~(delete-file "stddoc.c.html"))))
542 (build-system gnu-build-system)
543 (arguments
544 (list #:tests? #f ; no tests
545 #:phases
546 #~(modify-phases %standard-phases
547 (replace 'configure
548 (lambda _
549 (substitute* "stddoc.c"
550 ;; Note: For some reason quote characters are being
551 ;; inserted into urls and tags, eg.
552 ;; 'https://morgan3d.github.io/m""arkdeep/latest/markdeep.min.js?'
553 (("https://casual-effects.com/m\"*arkdeep/latest/")
554 (string-append #$markdeep "/share/markdeep/latest/"))
555 (("https://morgan3d.github.io/m\"*arkdeep/latest/")
556 (string-append #$markdeep "/share/markdeep/latest/")))))
557 (replace 'build
558 (lambda _
559 (invoke #$(cc-for-target)
560 "-O2" "-g" "-o" "stddoc" "stddoc.c")
561 (with-input-from-file "stddoc.c"
562 (lambda _
563 (with-output-to-file "stddoc.c.html"
564 (lambda _
565 (invoke #$(if (%current-target-system)
566 "stddoc"
567 "./stddoc"))))))))
568 (replace 'install
569 (lambda _
570 (install-file "stddoc"
571 (string-append #$output "/bin"))
572 (install-file "stddoc.c.html"
573 (string-append #$output
574 "/share/doc")))))))
575 (native-inputs (if (%current-target-system) (list this-package) '()))
576 (synopsis "Documentation generator for multiple programming languages")
577 (description "@code{stddoc.c} is a tiny documentation generator with many
578supported programming languages. Markdeep code comments are extracted from stdin and
579printed into stdout as a HTML file.")
580 (license license:unlicense))))