Subject: [bug#54069] [PATCH v2 3/4] gnu: libosinfo: Unbundle usb.ids, pci.ids.

From: Maxime Devos <[email-masked]>
Date: Sat, 26 Feb 2022 12:21:01 +0100

Brendan Tildesley schreef op za 26-02-2022 om 15:32 [+1100]:
> +         (string-append "-Dwith-usb-ids-path=" #$hwdata:usb "/share/hwdata/usb.ids")
> +         (string-append "-Dwith-pci-ids-path=" #$hwdata:pci "/share/hwdata/pci.ids"))

To allow for package transformations, I recommend using
this-package-input or the like instead of hardcoding a particular
package:

#~(list
    (string-append
      "-Dwith-usb-ids-path="
      #$(this-package-input "hwdata:usb") "/share/hwdata/usb.ids"))
    [...])

it might also be possible to use 'search-input-file' instead, avoiding
input labels (untested):

#~(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=" usb.ids) [...]))

Greetings,
Maxime.