diff options
author | Ludovic Courtès <ludo@gnu.org> | 2018-09-16 21:38:23 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2018-09-16 23:00:44 +0200 |
commit | ebbfc59c21d9888d43f36d8f23862030ebaaacce (patch) | |
tree | e316e2d5e45f2fd72b8a907ec480b7e6be3d08a5 /guix/scripts | |
parent | 5edef88b8873ad73ceb74c8801487fc16d64965c (diff) |
graph: Add '--system'.
* guix/scripts/graph.scm (%options, show-help): Add '--system'.
(%default-options): Add 'system'.
(guix-graph): Pass #:system to 'run-with-store'.
Diffstat (limited to 'guix/scripts')
-rw-r--r-- | guix/scripts/graph.scm | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/guix/scripts/graph.scm b/guix/scripts/graph.scm index 346ca4ea88..145a574dba 100644 --- a/guix/scripts/graph.scm +++ b/guix/scripts/graph.scm @@ -439,6 +439,10 @@ package modules, while attempting to retain user package modules." (option '(#\e "expression") #t #f (lambda (opt name arg result) (alist-cons 'expression arg result))) + (option '(#\s "system") #t #f + (lambda (opt name arg result) + (alist-cons 'system arg + (alist-delete 'system result eq?)))) (option '(#\h "help") #f #f (lambda args (show-help) @@ -462,6 +466,8 @@ Emit a representation of the dependency graph of PACKAGE...\n")) --list-types list the available graph types")) (display (G_ " -e, --expression=EXPR consider the package EXPR evaluates to")) + (display (G_ " + -s, --system=SYSTEM consider the graph for SYSTEM--e.g., \"i686-linux\"")) (newline) (display (G_ " -h, --help display this help and exit")) @@ -472,7 +478,8 @@ Emit a representation of the dependency graph of PACKAGE...\n")) (define %default-options `((node-type . ,%package-node-type) - (backend . ,%graphviz-backend))) + (backend . ,%graphviz-backend) + (system . ,(%current-system)))) ;;; @@ -508,7 +515,8 @@ Emit a representation of the dependency graph of PACKAGE...\n")) (export-graph (concatenate nodes) (current-output-port) #:node-type type - #:backend backend))))))) + #:backend backend)) + #:system (assq-ref opts 'system)))))) #t) ;;; graph.scm ends here |