summary refs log tree commit diff
path: root/guix/graph.scm
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2016-10-21 23:59:00 +0200
committerRicardo Wurmus <rekado@elephly.net>2016-12-14 21:57:37 +0100
commit642339dc3fc6df33edd78f3cdc170c20a32a3c7d (patch)
tree1e108854b9204e632f45054fd48f833dcb0ce8b0 /guix/graph.scm
parent51377437a1e37c9d5f2e137528e9c278b252d781 (diff)
downloadguix-642339dc3fc6df33edd78f3cdc170c20a32a3c7d.tar.gz
graph: Add "list-backend" and "backend" options.
* guix/graph.scm (%graph-backends): New variable.
* guix/scripts/graph.scm (lookup-backend, list-backends): New
procedures.
(%options): Add options for "backend" and "list-backends".
(show-help): Add help texts for "backend" and "list-backend" options.
(%default-options): Add "backend" default.
(guix-graph): Pass backend argument to "export-graph".
* doc/guix.texi (Invoking guix graph): Document the new options.
Diffstat (limited to 'guix/graph.scm')
-rw-r--r--guix/graph.scm10
1 files changed, 10 insertions, 0 deletions
diff --git a/guix/graph.scm b/guix/graph.scm
index 5cf98f0d54..d2c1fa6c48 100644
--- a/guix/graph.scm
+++ b/guix/graph.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2015, 2016 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -41,6 +42,7 @@
             node-transitive-edges
             node-reachable-count
 
+            %graph-backends
             %graphviz-backend
             graph-backend?
             graph-backend
@@ -179,6 +181,14 @@ typically returned by 'node-edges' or 'node-back-edges'."
                  emit-prologue emit-epilogue
                  emit-node emit-edge))
 
+
+;;;
+;;; Shared.
+;;;
+
+(define %graph-backends
+  (list %graphviz-backend))
+
 (define* (export-graph sinks port
                        #:key
                        reverse-edges? node-type