From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: bug#15284: wish: make the (name) field optional Date: Thu, 16 Apr 2020 23:53:33 +0200 Message-ID: <878sivm71e.fsf@elephly.net> References: <8761ueqq09.wl%arne_bab@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:42187) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jPCSS-0000LQ-Mx for bug-guix@gnu.org; Thu, 16 Apr 2020 17:54:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jPCSR-0007TZ-BH for bug-guix@gnu.org; Thu, 16 Apr 2020 17:54:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:56205) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jPCSR-0007Ss-1P for bug-guix@gnu.org; Thu, 16 Apr 2020 17:54:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jPCSR-0001uj-0t for bug-guix@gnu.org; Thu, 16 Apr 2020 17:54:03 -0400 In-Reply-To: <8761ueqq09.wl%arne_bab@web.de> Sender: "Debbugs-submit" Resent-To: bug-guix@gnu.org Resent-Message-ID: List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane-mx.org@gnu.org Sender: "bug-Guix" To: 15284-done@debbugs.gnu.org I agree with Ludo and Andreas that we better shouldn=E2=80=99t make the name field optional. That said, I just pushed a series of patches that happens to address this wishlist item in a very roundabout way. It is now possible to build packages from JSON files like this: --8<---------------cut here---------------start------------->8--- [ { "name": "myhello", "version": "2.10", "source": "mirror://gnu/hello/hello-2.10.tar.gz", "build-system": "gnu", "arguments": { "tests?": false } "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"] }, { "name": "greeter", "version": "1.0", "source": "https://example.com/greeter-1.0.tar.gz", "build-system": "gnu", "arguments": { "test-target": "foo", "parallel-build?": false, }, "home-page": "https://example.com/", "synopsis": "Greeter using GNU Hello", "description": "This is a wrapper around GNU Hello.", "license": "GPL-3.0+", "inputs": ["myhello", "hello"] } ] --8<---------------cut here---------------end--------------->8--- As you can see, there is no variable assignment, because this is JSON. The =E2=80=9Cname=E2=80=9D field is the only identifier, and its value can = be used as an input in other packages (see the reference to =E2=80=9Cmyhello=E2=80=9D in = the =E2=80=9Cgreeter=E2=80=9D package definition). It=E2=80=99s really only tangentially related to what this issue is about, = but it=E2=80=99s as close as we can get to duplication-free syntax =E2=80=94 ev= en though it=E2=80=99s JSON and not Scheme. Look, there are also no labels for input= s! Because there are no custom phases either=E2=80=A6 -- Ricardo