From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40868) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dmJ9C-0002q8-Ux for guix-patches@gnu.org; Mon, 28 Aug 2017 08:28:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dmJ98-00042e-16 for guix-patches@gnu.org; Mon, 28 Aug 2017 08:28:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:50244) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dmJ97-00042X-Tp for guix-patches@gnu.org; Mon, 28 Aug 2017 08:28:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dmJ97-0003Al-HZ for guix-patches@gnu.org; Mon, 28 Aug 2017 08:28:01 -0400 Subject: [bug#28251] [PATCH 0/3] Add generic JSON importer Resent-Message-ID: References: <20170827155820.28812-1-rekado@elephly.net> From: Ricardo Wurmus In-reply-to: <20170827155820.28812-1-rekado@elephly.net> Date: Mon, 28 Aug 2017 14:27:22 +0200 Message-ID: <87lgm3ho7p.fsf@elephly.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 28251@debbugs.gnu.org I have since made a couple of minor changes like adding a missing (guix gexp) import, adding the new script to the MODULES in Makefile.am, and adding a simple test for “data->guix-package”. I also have a small patch to “guix build -f”; given a file ending on “.json” it will parse the JSON and run “data->guix-package”. I have confirmed that this works for the “hello” package in JSON format. If this looks like a good idea I’ll convert the recursive CRAN importer to produce package objects; as a next step I’d extend “guix build” to accept a “--via=IMPORTER” option, which would cause a package to be imported and then built without requiring the manual work of writing or generating a package definition in Scheme. (Optionally, it could generate the code that could be contributed to Guix.) This is not meant to ever replace Scheme package definitions, but I think it can make importers useful to users, not only developers. -- Ricardo GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC https://elephly.net