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 ms0.migadu.com with LMTPS id oMHPHhDWGmJdBAEAgWs5BA (envelope-from ) for ; Sun, 27 Feb 2022 02:38:24 +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 QFR8FxDWGmKBhwAAG6o9tA (envelope-from ) for ; Sun, 27 Feb 2022 02:38:24 +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 9A1DC291E7 for ; Sun, 27 Feb 2022 02:38:23 +0100 (CET) Received: from localhost ([::1]:33724 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nO8Vy-000636-Be for larch@yhetil.org; Sat, 26 Feb 2022 20:38:22 -0500 Received: from eggs.gnu.org ([209.51.188.92]:56136) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nO8Ve-00062f-Lo for guix-patches@gnu.org; Sat, 26 Feb 2022 20:38:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:34365) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nO8Ve-0003Lm-DW for guix-patches@gnu.org; Sat, 26 Feb 2022 20:38:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nO8Ve-0002V1-BI for guix-patches@gnu.org; Sat, 26 Feb 2022 20:38:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#54069] [PATCH v2 3/4] gnu: libosinfo: Unbundle usb.ids, pci.ids. Resent-From: Brendan Tildesley Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 27 Feb 2022 01:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54069 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxime Devos , 54069@debbugs.gnu.org Cc: John Kehayias , Maxim Cournoyer Received: via spool by 54069-submit@debbugs.gnu.org id=B54069.16459258369528 (code B ref 54069); Sun, 27 Feb 2022 01:38:02 +0000 Received: (at 54069) by debbugs.gnu.org; 27 Feb 2022 01:37:16 +0000 Received: from localhost ([127.0.0.1]:56493 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nO8Ut-0002Tc-Kz for submit@debbugs.gnu.org; Sat, 26 Feb 2022 20:37:15 -0500 Received: from mout-p-201.mailbox.org ([80.241.56.171]:52146) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nO8Ur-0002T6-6m for 54069@debbugs.gnu.org; Sat, 26 Feb 2022 20:37:14 -0500 Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:105:465:1:1:0]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4K5mMk2xnGz9sSm; Sun, 27 Feb 2022 02:37:06 +0100 (CET) Date: Sun, 27 Feb 2022 02:37:02 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brendan.scot; s=MBO0001; t=1645925824; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IC7yVRvXVDG9Hl7Q492RiDZgZPy8Q7tOSKlYM08kTSc=; b=MOYp4iIEEcHD6ivieyiVfoz3N8AeVqNz0DIKP1b7at0g3hob0v6qgwtjh98sO6UB0kCtyH Nizc7+b5aEJhM5xmwlLGj4mf5DeZjyVBsWqL/3MEEw8yptAB8SKfCnuXf1NjIV4a5vT7AR 0iOsiuZRZx7z2BQReWKdWQhgL5mrGyJiJW0vQq4+mFThG+uvIYPAtGMlg2nKrFkT51s+zp lmNf5Vtk4TBp0Cnt9gsXe6wKs76rFuDqeCIkK7psHIRhSfZ3BBW8zY81US0Q2CNEFfQcwi obEZLRp6HVTdVtQOY1Ch1BjQqjOGbYzxL4yhdXj/hFOMvTsEe0f4k9tdakcA+Q== From: Brendan Tildesley Message-ID: <190017101.145924.1645925822107@office.mailbox.org> In-Reply-To: References: <20220226043238.2657-1-mail@brendan.scot> <20220226043238.2657-3-mail@brendan.scot> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Priority: 3 Importance: Normal X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1645925904; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=IC7yVRvXVDG9Hl7Q492RiDZgZPy8Q7tOSKlYM08kTSc=; b=P3TdTkrRgUC0PBI/meT4FeLGH9T4R9XgtV5LZ6u+Ezwx1pxcA/lbpzRDjns9jupx9CrI0M EtTICfkDpepN8TWUApCfiIS4NQ0Iza8H1CFbWkAVYMnP4eTnATw4VDbd6LmzhLPO0Kfb1c GSqAiLUI5OFeXk7PQnVYycUzw/KEZNPK7TwYUrwj6qt6clEFijM4eaZvXXeff182qcuXec ZVXv9rmgeQLhM+T1dprLFdoX2I+olueFSzaTHqwfNRuypRe4h43LTH0Ap/lPahSRbtR0Gb Wf1KQK/j+x+kSQTx426wCnInJAzlHAl1Lhlyo1RCWJGqqY/NdNu9g3HX1Y3vpA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1645925904; a=rsa-sha256; cv=none; b=T9HkgJEZMdIQjER6B2kBgnOfiOP3B/Zh6Jwn4DwH8lxvBMMbZ7JaSVIdnSk+fBZeyuMDkA A1b9huLPFqr3HMT4riMyEoT0EjzJfmJOD8ahGELNAAQvAb2YzPrVOFJXhQcFGyg/5eUWHk 8kgGs+Z08FyBHBpokFtrQKSe1WqshAioryFbtj6LwxrslbFT0vk2G6WzcK/1S1S2IzL1xW LcOKo/Zmxvf/0Zno48rJcb2HZKkXcDoI3P1m9sI45M/tyuSraX2vMgXnF5Kzru1BOziCM2 kpXnZ4V+RZ3LEZo+RTfSn5TZetfmNuXhWE54mVyreOxvaylFNuEFO4XXFzOYOw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=brendan.scot header.s=MBO0001 header.b=MOYp4iIE; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 1.89 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=brendan.scot header.s=MBO0001 header.b=MOYp4iIE; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 9A1DC291E7 X-Spam-Score: 1.89 X-Migadu-Scanner: scn0.migadu.com X-TUID: DNik3/PA5Rim > On 02/26/2022 12:21 PM Maxime Devos wrote: >=20 > =20 > Brendan Tildesley schreef op za 26-02-2022 om 15:32 [+1100]: > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (string-append "-Dwit= h-usb-ids-path=3D" #$hwdata:usb "/share/hwdata/usb.ids") > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (string-append "-Dwit= h-pci-ids-path=3D" #$hwdata:pci "/share/hwdata/pci.ids")) >=20 > To allow for package transformations, I recommend using > this-package-input or the like instead of hardcoding a particular > package: >=20 > #~(list > (string-append > "-Dwith-usb-ids-path=3D" > #$(this-package-input "hwdata:usb") "/share/hwdata/usb.ids")) > [...]) >=20 > it might also be possible to use 'search-input-file' instead, avoiding > input labels (untested): >=20 > #~(let* ((inputs #$(input-tuples->gexp (package-inputs this-package))) > (usb.ids (search-input-file inputs "/share/hwdata/usb.ids")) > (pci.ids (search-input-file inputs "/share/hwdata/pci.ids"))) > (list (string-append "-Dwith-usb-ids-path=3D" usb.ids) [...])) >=20 I got strange errors trying that and couldn't figure out how to make it wor= k. There are no examples of input-tuples->gexp being used in a package definit= ion. This works: #~(list (string-append "-Dwith-usb-ids-path=3D" (search-input-file %build-inputs "/share/hwdata/usb= .ids")) (string-append "-Dwith-pci-ids-path=3D" (search-input-file %build-inputs "/share/hwdata/pci= .ids"))) I thought %build-inputs was not a recommended thing to use though? > Greetings, > Maxime. Backtrace: In guix/store.scm: 1385:9 19 (map/accumulate-builds # =E2=80=A6) 1320:8 18 (call-with-build-handler # =E2=80=A6) In guix/scripts/build.scm: 582:16 17 (_ #) 571:24 16 (_ # =E2=80=A6) In guix/packages.scm: 1260:17 15 (supported-package? # =E2=80=A6) In guix/memoization.scm: 101:0 14 (_ # # =E2=80=A6) In guix/packages.scm: 1238:37 13 (_) 1498:16 12 (package->bag _ _ _ #:graft? _) 1603:43 11 (thunk) In ice-9/eval.scm: 191:35 10 (_ #(#(#)= =E2=80=A6)) 173:47 9 (_ #(#(#)= =E2=80=A6)) 213:29 8 (_ #(#(#)= =E2=80=A6)) 155:9 7 (_ #(#(#)= =E2=80=A6)) 202:35 6 (_ #(#(#)= =E2=80=A6)) In guix/gexp.scm: 1886:4 5 (input-tuples->gexp (("glib" # =E2= =80=A6) =E2=80=A6) =E2=80=A6) In srfi/srfi-1.scm: 586:17 4 (map1 (("glib" # = =E2=80=A6) =E2=80=A6)) In guix/gexp.scm: 1886:9 3 (_ _) In ice-9/boot-9.scm: 1685:16 2 (raise-exception _ #:continuable? _) 1685:16 1 (raise-exception _ #:continuable? _) 1685:16 0 (raise-exception _ #:continuable? _) ice-9/boot-9.scm:1685:16: In procedure raise-exception: Throw to key `match-error' with args `("match" "no matching pattern" ("glib= " # "bin"))'.