diff mbox

1/1 gnu: Add guile-graph

Message ID 20160909164503.3f82ad48@openmailbox.org
State New
Headers show

Commit Message

Dylan Jeffers Sept. 9, 2016, 11:45 p.m. UTC

Comments

Alex Kost Sept. 10, 2016, 8:25 a.m. UTC | #1
Dylan Jeffers (2016-09-09 16:45 -0700) wrote:

> From fc183108bfc3a62a002c8bf99466756fd13b61bf Mon Sep 17 00:00:00 2001
> From: Dylan Jeffers <sapientech@openmailbox.org>
> Date: Fri, 9 Sep 2016 16:37:17 -0700
> Subject: [PATCH] gnu: Add guile-graph.
>
> * gnu/packages/guile.scm (guile-graph): New variable.
> ---
>  gnu/packages/guile.scm | 36 ++++++++++++++++++++++++++++++++++++
>  1 file changed, 36 insertions(+)
>
> diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm
> index f26cc22..8ba5273 100644
> --- a/gnu/packages/guile.scm
> +++ b/gnu/packages/guile.scm
> @@ -1205,4 +1205,40 @@ is no support for parsing block and inline level HTML.")
>      (home-page "https://github.com/OrangeShark/guile-commonmark")
>      (license lgpl3+)))
>  
> +(define-public guile-graph
> +  (package
> +    (name "guile-graph")
> +    (version "0.1")
> +    (source (origin
> +              (method git-fetch)
> +              (uri (git-reference
> +                    (url "https://notabug.org/SapienTech/guile-graph.git")
> +                    (commit "d53c2f3228edf948ab8b084fe7c686eb3f3ba531")))

Why not 'url-fetch' with a release tag snapshot:

https://notabug.org/SapienTech/guile-graph/archive/0.1.tar.gz

> +              (sha256
> +               (base32
> +                "05c2d8ayhjq0brzbinggcvk35ymsxky1difhlhjlkvjxfm1khxzi"))
> +              (file-name (string-append name "--" version))))
                                                ^^^^
Just "-"

> +    (build-system gnu-build-system)
> +    (arguments
> +     '(#:phases
> +       (modify-phases %standard-phases
> +         (add-after 'unpack 'bootstrap
> +           (lambda _ (zero? (system* "sh" "bootstrap"))))
> +         (replace 'install
> +           (lambda _ (zero? (system* "make" "-i" "install")))))))

I think there should be a comment explaining why a usual 'install' phase
fails.

This package puts its .scm/.go files in non-versioned directories.  This
should be fixed (preferably upstream) so that our guix's guile can find
these modules.  See 'guile-json' or other guile packages for examples.

BTW, I see there is "bin/graph" guile script which just uses (graph
graph) module and nothing more┬╣, do you now why it is needed?  (it looks
useless for me, perhaps it should be removed, dunno)

> +    (native-inputs
> +     `(("autoconf" ,autoconf)
> +       ("automake" ,automake)
> +       ("pkg-config" ,pkg-config)))
> +    (inputs
> +     `(("guile" ,guile-2.0)))
> +    (synopsis "Boost graph port for guile")
> +    (description "guile-graph, patterned after the popular Boost Graph
> +Library for C++, allows for a clean separation between the graph
> +container and graph algorithms. While lacking in functionality compared
> +to Boost, it features both strict- and lazy-evaluated methods,
> +pause/continue/stop control and no memory constraints.")
> +    (home-page "https://notabug.org/SapienTech/guile-graph")
> +    (license gpl3+)))
> +
>  ;;; guile.scm ends here

┬╣ https://notabug.org/SapienTech/guile-graph/src/master/scripts/graph.in
diff mbox

Patch

From fc183108bfc3a62a002c8bf99466756fd13b61bf Mon Sep 17 00:00:00 2001
From: Dylan Jeffers <sapientech@openmailbox.org>
Date: Fri, 9 Sep 2016 16:37:17 -0700
Subject: [PATCH] gnu: Add guile-graph.

* gnu/packages/guile.scm (guile-graph): New variable.
---
 gnu/packages/guile.scm | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm
index f26cc22..8ba5273 100644
--- a/gnu/packages/guile.scm
+++ b/gnu/packages/guile.scm
@@ -1205,4 +1205,40 @@  is no support for parsing block and inline level HTML.")
     (home-page "https://github.com/OrangeShark/guile-commonmark")
     (license lgpl3+)))
 
+(define-public guile-graph
+  (package
+    (name "guile-graph")
+    (version "0.1")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://notabug.org/SapienTech/guile-graph.git")
+                    (commit "d53c2f3228edf948ab8b084fe7c686eb3f3ba531")))
+              (sha256
+               (base32
+                "05c2d8ayhjq0brzbinggcvk35ymsxky1difhlhjlkvjxfm1khxzi"))
+              (file-name (string-append name "--" version))))
+    (build-system gnu-build-system)
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'bootstrap
+           (lambda _ (zero? (system* "sh" "bootstrap"))))
+         (replace 'install
+           (lambda _ (zero? (system* "make" "-i" "install")))))))
+    (native-inputs
+     `(("autoconf" ,autoconf)
+       ("automake" ,automake)
+       ("pkg-config" ,pkg-config)))
+    (inputs
+     `(("guile" ,guile-2.0)))
+    (synopsis "Boost graph port for guile")
+    (description "guile-graph, patterned after the popular Boost Graph
+Library for C++, allows for a clean separation between the graph
+container and graph algorithms. While lacking in functionality compared
+to Boost, it features both strict- and lazy-evaluated methods,
+pause/continue/stop control and no memory constraints.")
+    (home-page "https://notabug.org/SapienTech/guile-graph")
+    (license gpl3+)))
+
 ;;; guile.scm ends here
-- 
2.7.3