From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id GHAsLX3r5WNLnAAAbAwnHQ (envelope-from ) for ; Fri, 10 Feb 2023 08:00:13 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id hvpGLH3r5WNlGAEAG6o9tA (envelope-from ) for ; Fri, 10 Feb 2023 08:00:13 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 08F851F85 for ; Fri, 10 Feb 2023 08:00:12 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pQNNo-0008T7-Ow; Fri, 10 Feb 2023 01:59:44 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pQKVg-0007AI-6w for guix-devel@gnu.org; Thu, 09 Feb 2023 22:55:40 -0500 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pQKVc-0005js-H1 for guix-devel@gnu.org; Thu, 09 Feb 2023 22:55:39 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 9034F24042E for ; Fri, 10 Feb 2023 04:55:33 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1676001334; bh=PM4W9yzwwA2MD0pl1bxZ9CJ9Rj3nHLvLJo+lbXco1fE=; h=From:To:Subject:Date:From; b=XDd94WV0MkqWZVm5X3wA7VibvaMaRBnWbvyQYaE3TUk/xWFqGByoE9fmWxFU4XwzI 1mn1RPrt2yZn7Vk/hoRWOVqVnFvKO83FazkHDvQ2Cip675mUIW6bLJfyoSZbXbs+2Y QZvJHG82UluUFmctgocdAMpHlv2kmPHKFUTwlx1vWDEj42tdv7D01bu7Tvkj0f+Tvd C0hn4I3CqnePzSuigrgU0EEc1LjGG/Y0R+/5cc2alLV+4BM1JWJXWeDcc+OWb8pvy3 2LOTqDE5NfHt2vet6icVRYyZIIuUXUGdWCSd40bB28utjY9qXrCQl0tPwypOcFiWx3 T9jmEL0XMiv2g== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4PCfyr30yTz6tnq for ; Fri, 10 Feb 2023 04:55:31 +0100 (CET) From: Kyle Andrews To: guix-devel@gnu.org Subject: Help adding a graph backend Date: Fri, 10 Feb 2023 03:10:02 +0000 Message-ID: <87ilga41jh.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=kyle@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Fri, 10 Feb 2023 01:59:43 -0500 X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1676012413; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=TLlWh3pVeUXoBAa/IEiPGHaZzgKu2640QZY0G9ClJPk=; b=Ytfj5v6gQAqF7SJZp1hO74NiapzktUxuPkeEpK6171X/rKx0HRgn7ETQtcrgdu4FThWptf fX1ZqTXhgOWerFKRjmOBe/ZEoNmIK3+iQwnHJ8zpvt6Sd0Ab2sluWbHnHISA0NiV1Ae1x/ HLyTUCbim6UXK0B0ONPUENYmmOGDei7+m8OHMy5ZU1msTkVkOlroBCIq/xAkIUGCRTjtiR LfQgbWCsFfvBcbjKoc69IwbcatYK7aDPFN0y7LO5eLd8UJ5/ascoSO3bY428w+u2JBg9q+ oBZdeu+8qhgHD+iYSqIvuAyDZYgtEfQHYK1Sad/8cLaR/GLHjiDod2AE/LNOoA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=XDd94WV0; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=posteo.net ARC-Seal: i=1; s=key1; d=yhetil.org; t=1676012413; a=rsa-sha256; cv=none; b=CZKBgQL9mf6LsneCro7BZ7Jbz+oguP/kq7eaBavlultlHFkAwUnWEYCCav+7OUkNqAJygY +jELBFNTZ1DnmBPlsRnpRBDCPVD4k9w6a9ghmIGM2MFSSKC2qgZhTnUxGCYTJbbrxCUe1i QT3CO4v/JX7lFELSf3gJnpmspFHduNGbUQXPkkY9AtWG/Re0nykPD1VgR3l/ANSmYopMSZ e/gHdnkj+KNxsayma5VKfOEUU/JkzgjkMgeJWRNFF9o0NDoeOlSWNI2hoBZYikrsLC2dEb V1/sTuvlpLRJqLe+EfnxCTd1S9xZ/227HntXBAIecus6fvQdCCWaqOQ5gDAwcQ== X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -6.57 X-Spam-Score: -6.57 X-Migadu-Queue-Id: 08F851F85 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=XDd94WV0; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=posteo.net X-TUID: qc6Ix1D7pj8V 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