Subject: [bug#76150] [PATCH 15/16] gnu: Add plantri.

From: Vinicius Monego <[email-masked]>
Date: Sun, 9 Feb 2025 01:52:32 +0000

* gnu/packages/graph.scm (plantri): New variable.

Change-Id: I976eb88437b47bc06d7b2c2f8703da217e85cc7e
---
 gnu/packages/graph.scm | 35 ++++++++++++++++++++++++++++++++++-
 1 file changed, 34 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/graph.scm b/gnu/packages/graph.scm
index c8bd25af9c..5303f2e9db 100644
--- a/gnu/packages/graph.scm
+++ b/gnu/packages/graph.scm
@@ -6,7 +6,7 @@
 ;;; Copyright © 2019 Andreas Enge <[email-masked]>
 ;;; Copyright © 2020 Alexander Krotov <[email-masked]>
 ;;; Copyright © 2020 Pierre Langlois <[email-masked]>
-;;; Copyright © 2021, 2023 Vinicius Monego <[email-masked]>
+;;; Copyright © 2021, 2023, 2025 Vinicius Monego <[email-masked]>
 ;;; Copyright © 2021 Alexandre Hannud Abdo <[email-masked]>
 ;;; Copyright © 2021, 2022, 2023 Maxim Cournoyer <[email-masked]>
 ;;; Copyright © 2022 Marius Bakke <[email-masked]>
@@ -783,6 +783,39 @@ (define-public edge-addition-planarity-suite
     (home-page
       "https://github.com/graph-algorithms/edge-addition-planarity-suite")))
 
+(define-public plantri
+  (package
+    (name "plantri")
+    (version "5.5")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://users.cecs.anu.edu.au/~bdm/plantri/"
+                                  "plantri" (string-join
+                                             (string-split version #\.)
+                                             "") ".tar.gz"))
+              (sha256
+               (base32
+                "1vbxpjih293d9nmb65fsh6xgg0w12kygwycg1yw4wad7ridxy74i"))))
+    (build-system gnu-build-system)
+    (arguments
+     (list
+      #:tests? #f ; there are no tests
+      #:phases #~(modify-phases %standard-phases
+                   (delete 'configure)
+                   (replace 'install
+                     (lambda _
+                       (for-each
+                        (lambda (bin)
+                          (install-file bin (string-append #$output "/bin")))
+                        '("fullgen" "plantri")))))))
+    (home-page "https://users.cecs.anu.edu.au/~bdm/plantri/")
+    (synopsis "Generate certain types of planar graphs")
+    (description
+     "@code{plantri} and @code{fullgen} are programs for generation of certain
+types of planar graphs.  Graphs are generated in such a way that exactly one
+member of each isomorphism class is output without the need for storing them.")
+    (license license:asl2.0)))
+
 (define-public rw
   (package
     (name "rw")
-- 
2.48.1