From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:44095) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jOUZ9-0000el-NN for guix-patches@gnu.org; Tue, 14 Apr 2020 19:02:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jOUZ8-0003Hf-Ko for guix-patches@gnu.org; Tue, 14 Apr 2020 19:02:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:51659) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jOUZ8-0003Gp-B4 for guix-patches@gnu.org; Tue, 14 Apr 2020 19:02:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jOUZ8-00028J-20 for guix-patches@gnu.org; Tue, 14 Apr 2020 19:02:02 -0400 Subject: [bug#40629] [PATCH v2 9/9] import/json: json->code: Handle files with more than one definition. Resent-Message-ID: References: <20200414225903.10862-1-rekado@elephly.net> <20200414225903.10862-2-rekado@elephly.net> From: Ricardo Wurmus In-reply-to: <20200414225903.10862-2-rekado@elephly.net> Date: Wed, 15 Apr 2020 01:01:11 +0200 Message-ID: <87tv1ln03s.fsf@elephly.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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: 40629@debbugs.gnu.org Cc: Ricardo Wurmus With these last few changes it=E2=80=99s now possible to have multiple definitions in a JSON array: --8<---------------cut here---------------start------------->8--- [ { "name": "myhello", "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"] }, { "name": "hello2", "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+", "inputs": ["myhello"], "native-inputs": ["gettext"] } ] --8<---------------cut here---------------end--------------->8--- =E2=80=9Chello2=E2=80=9D has =E2=80=9Cmyhello=E2=80=9D as an input. When t= his file is passed to =E2=80=9Cguix install -f=E2=80=9D both packages will be built and =E2=80=9Chello2=E2=80= =9D will be installed into the profile as it is the last package in the list. -- Ricardo