Subject: [PATCH 0/1] guix: graph: Add 'plain' backend.
From: zimoun <[email-masked]>
To: [email-masked]
Cc: zimoun <[email-masked]>
Date: Thu, 17 Sep 2020 21:39:31 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Dear,

I am always annoyed when I use "guix graph" because most of the time I run:

  guix graph htop | grep label

or something along these lines.  Instead, the patch avoids the grep part:

--8<---------------cut here---------------start------------->8---
$ ./pre-inst-env guix graph -b plain htop
[email-masked]
[email-masked]
[email-masked]
[email-masked]
[email-masked]
[email-masked]
[email-masked]
[email-masked]
[email-masked]
[email-masked]
[email-masked]
[email-masked]
[email-masked]
[email-masked]
[email-masked]
[email-masked]
[email-masked]
--8<---------------cut here---------------end--------------->8---

It is then easier to pipe with other Guix commands, for example:

--8<---------------cut here---------------start------------->8---
$ guix build $(./pre-inst-env guix graph -b plain htop | grep bash)
substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0%
0.9 MB will be downloaded:
   /gnu/store/m4qpxmn9v0jrylgbkzwssh5avzwhqil6-bash-minimal-5.0.16-doc
   /gnu/store/fvhj74pghapbjvsvj27skvkra1by1965-bash-minimal-5.0.16
substituting /gnu/store/m4qpxmn9v0jrylgbkzwssh5avzwhqil6-bash-minimal-5.0.16-doc...
downloading from https://ci.guix.gnu.org/nar/lzip/m4qpxmn9v0jrylgbkzwssh5avzwhqil6-bash-minimal-5.0.16-doc ...
 bash-minimal-5.0.16-doc  290KiB     444KiB/s 00:01 [##################] 100.0%

/gnu/store/vk4r0x7baig8jnmsqrgrqpyq8qxr4gm3-bash-5.0.16-doc
/gnu/store/v1xc4405s7xilmwhhkdj8z55wa2wlr8y-bash-5.0.16-include
/gnu/store/87kif0bpf0anwbsaw0jvg8fyciw4sz67-bash-5.0.16
/gnu/store/m4qpxmn9v0jrylgbkzwssh5avzwhqil6-bash-minimal-5.0.16-doc
/gnu/store/fvhj74pghapbjvsvj27skvkra1by1965-bash-minimal-5.0.16
--8<---------------cut here---------------end--------------->8---

Note that the manual is not updated since, since I do not know how to extend
the relevant section.   Note also that "tests/guix-graph.sh" does not test any
of the backends.

All the best,
simon

zimoun (1):
  guix: graph: Add 'plain' backend.

 guix/graph.scm | 26 +++++++++++++++++++++++++-
 1 file changed, 25 insertions(+), 1 deletion(-)

base-commit: 8d557d4167ea98dfbc200fd20f64b8da36da35a2
-- 
2.28.0