unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#35527] [PATCH] gnu: Add nauty.
@ 2019-05-01 20:09 Nicolas Goaziou
  2019-05-16 21:22 ` bug#35527: " Nicolas Goaziou
  0 siblings, 1 reply; 2+ messages in thread
From: Nicolas Goaziou @ 2019-05-01 20:09 UTC (permalink / raw)
  To: 35527

[-- Attachment #1: Type: text/plain, Size: 397 bytes --]

Hello,

The following patch adds nauty to maths.scm. Upstream doesn't provide
any install target, so installation is rather rough. In particular, it
creates a lot of executables. For the record, Debian prefix all of them
with "nauty-" (except for the main one: "dreadnaut"). I sticked to
upstream names.

There is no missing module, I promise. ;)

Feedback welcome.

Regards,

-- 
Nicolas Goaziou

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-nauty.patch --]
[-- Type: text/x-diff, Size: 4225 bytes --]

From 4f349819dd4492b99a044117d402983b358b2c6b Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Date: Wed, 1 May 2019 21:58:35 +0200
Subject: [PATCH] gnu: Add nauty.

* gnu/packages/maths.scm (nauty): New variable.
---
 gnu/packages/maths.scm | 69 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 69 insertions(+)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index d59028599f..8553ddab4b 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -4908,3 +4908,72 @@ coordinated fashion, as part of the Great Internet Mersenne Prime
 Search (GIMPS).  Mlucas also includes a simple Python script for assignment
 management via the GIMPS project's Primenet server.")
     (license license:gpl2+)))
+
+(define-public nauty
+  (package
+    (name "nauty")
+    (version "2.6r11")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://pallini.di.uniroma1.it/"
+                    "nauty" (string-join (string-split version #\.) "")
+                    ".tar.gz"))
+              (sha256
+               (base32
+                "05z6mk7c31j70md83396cdjmvzzip1hqb88pfszzc6k4gy8h3m2y"))))
+    (build-system gnu-build-system)
+    (outputs '("out" "lib"))
+    (arguments
+     `(#:test-target "checks"
+       #:phases
+       (modify-phases %standard-phases
+         ;; Default make target does not build all available
+         ;; executables.  Create them now.
+         (add-after 'build 'build-extra-programs
+           (lambda _
+             (for-each (lambda (target) (invoke "make" target))
+                       '("blisstog" "bliss2dre" "checks6" "sumlines"))
+             #t))
+         ;; Upstream does not provide any install target.
+         (replace 'install
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (lib-output (assoc-ref outputs "lib"))
+                    (bin (string-append out "/bin"))
+                    (doc (string-append out "/share/doc/nauty/"))
+                    (include (string-append lib-output "/include/nauty"))
+                    (lib (string-append lib-output "/lib/nauty")))
+               (for-each (lambda (f) (install-file f bin))
+                         '("dreadnaut" "NRswitchg" "addedgeg" "amtog" "biplabg"
+                           "blisstog" "bliss2dre" "catg" "checks6" "complg"
+                           "converseg" "copyg" "countg" "cubhamg" "deledgeg"
+                           "delptg" "directg" "dretodot" "dretog" "genbg"
+                           "genbgL" "geng" "genquarticg" "genrang" "genspecialg"
+                           "gentourng" "gentreeg" "hamheuristic" "labelg"
+                           "linegraphg" "listg" "multig" "newedgeg" "pickg"
+                           "planarg" "ranlabg" "shortg" "showg" "subdivideg"
+                           "sumlines" "twohamg" "vcolg" "watercluster2"))
+               (for-each (lambda (f) (install-file f include))
+                         (find-files "." "\\.h$"))
+               (for-each (lambda (f) (install-file f lib))
+                         (find-files "." "\\.a$"))
+               (for-each (lambda (f) (install-file f doc))
+                         (append '("formats.txt" "README" "schreier.txt")
+                                 (find-files "." "\\.pdf$")))))))))
+    (inputs
+     `(("gmp" ,gmp)))                   ;for sumlines
+    (home-page "https://pallini.di.uniroma1.it/")
+    (synopsis "Library for graph automorphisms")
+    (description "@code{nauty} (No AUTomorphisms, Yes?) is a set of
+procedures for computing automorphism groups of graphs and digraphs.
+
+@code{nauty} computes graph information in the form of a set of
+generators, the size of the group, and the orbits of the group; it can
+also produce a canonical label.  The @code{nauty} suite is written in
+C and comes with a command-line interface, a collection of
+command-line tools, and an Application Programming Interface (API).
+
+This package provides the static libraries required to run programs
+compiled against the nauty library.")
+    (license license:asl2.0)))
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* bug#35527: [PATCH] gnu: Add nauty.
  2019-05-01 20:09 [bug#35527] [PATCH] gnu: Add nauty Nicolas Goaziou
@ 2019-05-16 21:22 ` Nicolas Goaziou
  0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Goaziou @ 2019-05-16 21:22 UTC (permalink / raw)
  To: 35527-done

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-05-16 21:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-01 20:09 [bug#35527] [PATCH] gnu: Add nauty Nicolas Goaziou
2019-05-16 21:22 ` bug#35527: " Nicolas Goaziou

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).