From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 17 13:45:13 2020 Received: (at 40629) by debbugs.gnu.org; 17 Apr 2020 17:45:13 +0000 Received: from localhost ([127.0.0.1]:41639 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jPV3B-0008OP-Hb for submit@debbugs.gnu.org; Fri, 17 Apr 2020 13:45:13 -0400 Received: from mira.cbaines.net ([212.71.252.8]:58052) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jPV3A-0008OI-IX for 40629@debbugs.gnu.org; Fri, 17 Apr 2020 13:45:13 -0400 Received: from localhost (unknown [46.237.173.52]) by mira.cbaines.net (Postfix) with ESMTPSA id 80F8A27BBE1; Fri, 17 Apr 2020 18:45:11 +0100 (BST) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id f66918b9; Fri, 17 Apr 2020 17:45:09 +0000 (UTC) References: <87y2qym5v8.fsf@elephly.net> <87v9m061w3.fsf@cbaines.net> <87lfmwmlk4.fsf@elephly.net> User-agent: mu4e 1.2.0; emacs 26.3 From: Christopher Baines To: Ricardo Wurmus Subject: Re: [bug#40629] Build and install packages from JSON definitions In-reply-to: <87lfmwmlk4.fsf@elephly.net> Date: Fri, 17 Apr 2020 18:45:06 +0100 Message-ID: <87k12e57ml.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 40629 Cc: 40629@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ricardo Wurmus writes: > Christopher Baines writes: > >> Ricardo Wurmus writes: >> >>> did you know that we have JSON importer? Admittedly, it=E2=80=99s not = very >>> useful because people don=E2=80=99t generally use JSON syntax to define= Guix >>> packages. Not even Guix lets you build and install packages from JSON >>> definitions, so what=E2=80=99s the point really? >>> >>> Well, fret not! This patch set adds support for JSON package >>> definitions to =E2=80=9Cguix package -f=E2=80=9D and =E2=80=9Cguix buil= d -f=E2=80=9D. You can now dump >>> this into a file =E2=80=9Chello.json=E2=80=9D: >>> >>> --8<---------------cut here---------------start------------->8--- >>> { >>> "name": "hello", >>> "version": "2.10", >>> "source": "mirror://gnu/hello/hello-2.10.tar.gz", >>> "build-system": "gnu", >>> "home-page": "https://www.gnu.org/software/hello/", >>> "synopsis": "Hello, GNU world: An example GNU package", >>> "description": "GNU Hello prints a greeting.", >>> "license": "GPL-3.0+", >>> "native-inputs": ["gettext"] >>> } >>> --8<---------------cut here---------------end--------------->8--- >>> >>> and then install the hello package with =E2=80=9Cguix package -f hello.= json=E2=80=9D >>> without having to first run the JSON importer. >>> >>> Since the JSON importer doesn=E2=80=99t know how to work with more than= one >>> definition you can=E2=80=99t have more than one custom definition in yo= ur JSON >>> file, but if there=E2=80=99s interest we can easily add support for thi= s. >>> >>> (My patch set does not come with documentation changes for =E2=80=9Cguix >>> package=E2=80=9D or =E2=80=9Cguix build=E2=80=9D.) >>> >>> What do you think? >> >> I haven't played with the JSON importer, but this sounds cool. Did you >> have any ideas for using this in mind? > > When I added the JSON importer long ago I also had a commit to extend > =E2=80=9Cguix build=E2=80=9D to install packages from JSON descriptions, = but that never > actually made it into the repository. > > Even then I didn=E2=80=99t have a grand plan; I just wanted to be able to= tell > the Scheme-averse that they could use JSON instead, e.g. for environment > definitions or simple custom packages. > > It can be a sneaky way to get people to use Guix even though they are > initially uncomfortable with Scheme. Cool, I think it's nice to be able to use a more "data" format if that's useful. I'm sure there will be some useful applications eventually! Thanks, Chris --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAl6Z6yJfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE 9XcHCRAAk1q3kSKjimZEUQNL/HOC+1r7AAmCxwa0C46zZFhZ7qUGei6oua7Er1QW c1RwyP1SsyKVs8IzdbHTEBwiT/OBWDckJkDTnT1twaG6fy8rQBAcng1UhyRmmVtS zRYIIRHRdID2mo+jhkD/hBEa99aCT8FrZRnecsAjsO/4VkrfANnUdgt5lTQl/RhF +pimYNNZeB0uxe8D0GxeoFjdOXNE4iaQsPotDssctIKt+qWV6nBlUpS6A28eUxM4 MeP9RSg3g35AcR2D/DMFwV0GTgL8HJ3LYn1twB8DLoqQ8K1qzL+2EYkq7q6Ooy/W PjYP2k9DEblnmppv8N6B9acwoF/CUYBlX7paWfNKJhTaMDun03+nE5tk7ryRsa1l jgCt9XVIeXz1JuA26nXSLGkpAr1UeCc6jBH4W9Ect3A8TBvNHXnH73zhh63cdUNG va3ivErUfOX6CQxXNdvlneeF1DHw8yYgGaXNbOruFXHTRx3RvK5c9dT9BusjviW0 gsXs+nxHFysfVzfhxjMV56y8RFpWbS3WZT6A+a1jP9JkMrOZCSlWZOCKhn8hJNXr aPV331Lksmk20b5j6cx64DFki7JKUaXNRfEWufNnhcyJmk+vMht2P7xO63+aM0Fj Zu3KZhkAZrA4CF9w6wFQIqxkRp8VdoYqMYf85xJ8lgTLfejPGc0= =XSN/ -----END PGP SIGNATURE----- --=-=-=--