unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Christina O'Donnell <cdo@mutix.org>
To: 56576@debbugs.gnu.org
Cc: Maxime Devos <maximedevos@telnet.be>,
	Christina O'Donnell <cdo@mutix.org>,
	Steve George <steve@futrile.net>
Subject: [bug#56576] [PATCH v3 2/3] gnu: Add stddoc.
Date: Wed,  3 Apr 2024 23:46:34 +0100	[thread overview]
Message-ID: <f0c8999b71f4c1d6d62aad5b5ea83760eb435328.1712184392.git.cdo@mutix.org> (raw)
In-Reply-To: <aa7483564f086c1dd70c428c0156ef8355e76a61.1712184392.git.cdo@mutix.org>

* gnu/packages/documentation.scm (stddoc): New variable.

Change-Id: I0f60126ef78a45733ad7395352e9bad49561437b
---
 gnu/packages/documentation.scm | 57 ++++++++++++++++++++++++++++++++++
 1 file changed, 57 insertions(+)

diff --git a/gnu/packages/documentation.scm b/gnu/packages/documentation.scm
index da930c7304..c9ec860fef 100644
--- a/gnu/packages/documentation.scm
+++ b/gnu/packages/documentation.scm
@@ -518,3 +518,60 @@ (define-public markdeep
 be displayed in any web browser, whether local or remote.  It supports diagrams,
 calendars, equations, and other features as extensions of Markdown syntax.")
     (license license:bsd-2)))
+
+(define-public stddoc
+  (let ((commit "6eef9deaf2e36bae812f50e448a8012b3e5efb14")
+        (revision "1"))
+    (package
+      (name "stddoc")
+      (version (git-version "1.0.2" revision commit))
+      (home-page "https://github.com/r-lyeh/stddoc.c")
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url home-page)
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "06phjp7wbf4x1sagxwfapgv6iyiixmijxxbg2clb48kyvjg5mlwn"))
+         (snippet #~(delete-file "stddoc.c.html"))))
+      (build-system gnu-build-system)
+      (arguments
+       (list #:tests? #f ; no tests
+             #:phases
+             #~(modify-phases %standard-phases
+                 (replace 'configure
+                   (lambda _
+                     (substitute* "stddoc.c"
+                       ;; Note: For some reason quote characters are being
+                       ;; inserted into urls and tags, eg.
+                       ;; 'https://morgan3d.github.io/m""arkdeep/latest/markdeep.min.js?'
+                       (("https://casual-effects.com/m\"*arkdeep/latest/")
+                        (string-append #$markdeep "/share/markdeep/latest/"))
+                       (("https://morgan3d.github.io/m\"*arkdeep/latest/")
+                        (string-append #$markdeep "/share/markdeep/latest/")))))
+                 (replace 'build
+                   (lambda _
+                     (invoke #$(cc-for-target)
+                             "-O2" "-g" "-o" "stddoc" "stddoc.c")
+                     (with-input-from-file "stddoc.c"
+                       (lambda _
+                         (with-output-to-file "stddoc.c.html"
+                           (lambda _
+                             (invoke #$(if (%current-target-system)
+                                           "stddoc"
+                                           "./stddoc"))))))))
+                 (replace 'install
+                   (lambda _
+                     (install-file "stddoc"
+                                   (string-append #$output "/bin"))
+                     (install-file "stddoc.c.html"
+                                   (string-append #$output
+                                                  "/share/doc")))))))
+      (native-inputs (if (%current-target-system) (list this-package) '()))
+      (synopsis "Documentation generator for multiple programming languages")
+      (description "@code{stddoc.c} is a tiny documentation generator with many
+supported programming languages.  Markdeep code comments are extracted from stdin and
+printed into stdout as a HTML file.")
+      (license license:unlicense))))
-- 
2.41.0





  reply	other threads:[~2024-04-03 22:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-15 14:57 [bug#56576] [PATCH] gnu: Add nuklear Antero Mejr via Guix-patches via
2022-08-05  3:03 ` 宋文武 via Guix-patches via
2022-08-06 22:57 ` [bug#56576] [PATCH 1/2] gnu: Add stddoc Antero Mejr via Guix-patches via
2022-08-06 22:57   ` [bug#56576] [PATCH 2/2] gnu: Add nuklear Antero Mejr via Guix-patches via
2022-08-07 12:10   ` [bug#56576] [PATCH 1/2] gnu: Add stddoc Maxime Devos
2024-04-03 22:46 ` [bug#56576] [PATCH v3 1/3] gnu: Add markdeep Christina O'Donnell
2024-04-03 22:46   ` Christina O'Donnell [this message]
2024-04-03 22:46   ` [bug#56576] [PATCH v3 3/3] gnu: Add nuklear Christina O'Donnell
2024-04-11 10:37   ` bug#56576: [PATCH v3 1/3] gnu: Add markdeep Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f0c8999b71f4c1d6d62aad5b5ea83760eb435328.1712184392.git.cdo@mutix.org \
    --to=cdo@mutix.org \
    --cc=56576@debbugs.gnu.org \
    --cc=maximedevos@telnet.be \
    --cc=steve@futrile.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).