From: Julien Lepiller <julien@lepiller.eu>
To: guix-devel@gnu.org, Kyle Andrews <kyle@posteo.net>
Subject: Re: Help adding a graph backend
Date: Fri, 10 Feb 2023 08:11:11 +0100 [thread overview]
Message-ID: <3D5D5CCB-C250-4FB2-A229-711B5C4C0CBF@lepiller.eu> (raw)
In-Reply-To: <87ilga41jh.fsf@posteo.net>
As the message says, use ./configure --localstatedir=/var :)
Le 10 février 2023 04:10:02 GMT+01:00, Kyle Andrews <kyle@posteo.net> a écrit :
>
>Dear Guix,
>
>I am not very comfortable editing Guix source code. However, I would
>very much like to add a new backend for `guix graph`. Right now guix
>graph descriptions can only be exported into special purpose tools like
>graphviz, D3, and cypher. I would like to add a fourth option which
>would support loading the dependency data into general purpose network analysis software tools: an edgelist backend.
>
>=> https://en.wikipedia.org/wiki/Edge_list
>
>I think this code will do the job, but I don't know how to test it. So, I don't know for sure.
>
>``` guix/graph.scm
>(define (el-prologue name port)
> (display "from, to" port))
>
>(define (el-epilogue port)
> (display "\n" port))
>
>(define (el-node id label port)
> (display "" port))
>
>(define (el-edge id1 id2 port)
> (format port "~a, ~a\n"))
>
>(define %edgelist-backend
> (graph-backend "edgelist"
> "Generate graph in CSV edge list format"
> el-prologue el-epilogue
> el-node el-edge))
>
>(define %graph-backends
> (list %graphviz-backend
> %d3js-backend
> %cypher-backend
> %edgelist-backend)) ; <- the new proposed backend
>```
>
>Maybe it would be using some incantation involving ./pre-inst-env? I gave it a try following the manual:
>
>```
>cd ~/{{path/to/guix}}
>guix shell -D guix
>./bootstrap
>./configure
>```
>
>This gave an error:
>
>```
>configure: error: chosen localstatedir '/usr/local/var' does not match that of the existing installation '/var'
>Installing may corrupt /gnu/store!
>Use './configure --localstatedir=/var'.
>```
>
>Since I am not that excited about corrupting my /gnu/store given that I don't know what I am doing, I didn't proceed further.
>
>I figured because I wanted to extend Guix with a new feature and that I
>could piece together a story in my head about how the code should look, my query should be sent to this list rather than to help-guix.
>
>Thanks in advance for any helpful suggestions towards getting this backend added to Guix!
>
>Cheers,
>Kyle
>
next prev parent reply other threads:[~2023-02-10 7:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-10 3:10 Help adding a graph backend Kyle Andrews
2023-02-10 7:11 ` Julien Lepiller [this message]
2023-02-10 9:25 ` Attila Lendvai
2023-02-10 9:30 ` Andreas Enge
2023-02-10 19:03 ` Kyle
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3D5D5CCB-C250-4FB2-A229-711B5C4C0CBF@lepiller.eu \
--to=julien@lepiller.eu \
--cc=guix-devel@gnu.org \
--cc=kyle@posteo.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).