[bug#77938] gnu: guile-srfi-234-manual: info manual for guile-srfi-234

Message ID dbf3b5b424d7066631ef326c123eadba85076e1d.1745151708.git.yuval.langer@gmail.com
State New
Headers
Series [bug#77938] gnu: guile-srfi-234-manual: info manual for guile-srfi-234 |

Commit Message

Yuval Langer April 20, 2025, 12:21 p.m. UTC
  * gnu/packages/guile-xyz.scm (guile-srfi-234-manual): New variable.
* gnu/packages/guile-xyz.scm (guile-srfi-234): Add guile-srfi-234-manual as propagated input.
---
 gnu/packages/guile-xyz.scm | 44 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 44 insertions(+)
  

Patch

diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index 537e84d3f82..323b0f1e12d 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -4634,6 +4634,49 @@  procedures, and procedures created with it have predictable behavior when
 applied to surplus arguments.")
     (license license:expat)))
 
+(define-public guile-srfi-234-manual
+  (let ((version "1.0.0")
+        (revision "1")
+        (commit "2c5eb7308ba0da2cbf525ca853dcc7d626dd1a09"))
+    (package
+      (name "guile-srfi-234-manual")
+      (version (git-version version revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://codeberg.org/kakafarm/guile-srfi-234-manual")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "1bdlz9018dbfj4w5hv6qin3q1cfy72i1hh7g5154p1b5vydxr58p"))))
+      (build-system copy-build-system)
+      (arguments
+       (list
+        #:install-plan #~'(("srfi-234.info" "share/info/"))
+        #:phases #~(modify-phases %standard-phases
+                     (add-after 'patch-source-shebangs 'compile-the-files
+                       (lambda _
+                         (import (ice-9 ftw))
+                         (system* "emacs"
+                                  "--batch"
+                                  "--eval"
+                                  "(progn
+    (find-file \"srfi-234.org\")
+    (org-texinfo-export-to-info))"))))))
+      (native-inputs (list emacs texinfo))
+      (home-page "https://codeberg.org/kakafarm/guile-srfi-234-manual")
+      (synopsis "Topological sorting module for Guile Scheme")
+      (description
+       "Topological sorting is an algorithm that takes a graph consisting of
+nodes and other nodes that depend on them, forming a partial order, and
+returns a list representing a total ordering of the graph. If the graph is
+cyclic, the topological sort will fail. The procedure topological-sort returns
+three values. If sorting succeeds, the first value contains the result and the
+second and third are #false. If sorting fails, the result is #false and the
+second and third value may provide additional information about the error.")
+      (license license:expat))))
+
 (define-public guile-srfi-234
   (let ((version "1.0.0")
         (revision "1")
@@ -4660,6 +4703,7 @@  applied to surplus arguments.")
                            (("srfi 234") "srfi srfi-234"))
                          (rename-file "srfi/234.sld" "srfi/srfi-234.scm"))))))
       (native-inputs (list guile-3.0))
+      (propagated-inputs (list guile-srfi-234-manual))
       (home-page "https://github.com/scheme-requests-for-implementation/srfi-234")
       (synopsis "Topological sorting module for Guile Scheme")
       (description