diff options
author | Brendan Tildesley <mail@brendan.scot> | 2022-03-10 20:31:44 +1100 |
---|---|---|
committer | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2022-03-22 21:55:54 -0400 |
commit | 5b59df328b6da9f1d0f27a4c647ecab7515762a2 (patch) | |
tree | 09c2a01050053277cc4567693b1150c4c259854c | |
parent | 03d8fd4557edd59bcc5d24724f130a515e914479 (diff) | |
download | guix-5b59df328b6da9f1d0f27a4c647ecab7515762a2.tar.gz guix-5b59df328b6da9f1d0f27a4c647ecab7515762a2.zip |
gnu: libosinfo: Use hwdata for pci.ids and usb.ids.
* gnu/packages/virtualization.scm (libosinfo)
[arguments]: Use gexps.
[configure-flags]: Search usb.ids and pci.ids via search-input-file.
[phases]{patch-osinfo-path}: Use search-input-directory.
[inputs]: Use new style.
[native-inputs]: Use new style. Replace pci.ids and usb.ids by the hwdata pci
and usb outputs, respectively.
Co-authored-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
-rw-r--r-- | gnu/packages/virtualization.scm | 68 |
1 files changed, 28 insertions, 40 deletions
diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm index 90472b9221..9f5d790cc7 100644 --- a/gnu/packages/virtualization.scm +++ b/gnu/packages/virtualization.scm @@ -99,8 +99,9 @@ #:use-module (gnu packages ninja) #:use-module (gnu packages onc-rpc) #:use-module (gnu packages package-management) - #:use-module (gnu packages perl) + #:use-module (gnu packages pciutils) #:use-module (gnu packages pcre) + #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) #:use-module (gnu packages polkit) #:use-module (gnu packages protobuf) @@ -1056,46 +1057,33 @@ of one or more RISC-V harts.") "0nd360c9ampw8hb6xh5g45q858df2r4jj9q88bcl6gzgaj0l3wxl")))) (build-system meson-build-system) (arguments - `(#:configure-flags - (list (string-append "-Dwith-usb-ids-path=" - (assoc-ref %build-inputs "usb.ids")) - (string-append "-Dwith-pci-ids-path=" - (assoc-ref %build-inputs "pci.ids"))) - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'patch-osinfo-path - (lambda* (#:key inputs #:allow-other-keys) - (substitute* "osinfo/osinfo_loader.c" - (("path = DATA_DIR.*") - (string-append "path = \"" (assoc-ref inputs "osinfo-db") - "/share/osinfo\";")))))))) - (inputs - `(("libsoup" ,libsoup-minimal-2) - ("libxml2" ,libxml2) - ("libxslt" ,libxslt) - ("osinfo-db" ,osinfo-db))) + (list + #:configure-flags + #~(list (string-append "-Dwith-usb-ids-path=" + (search-input-file %build-inputs + "share/hwdata/usb.ids")) + (string-append "-Dwith-pci-ids-path=" + (search-input-file %build-inputs + "share/hwdata/pci.ids"))) + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'patch-osinfo-path + (lambda* (#:key native-inputs inputs #:allow-other-keys) + (substitute* "osinfo/osinfo_loader.c" + (("path = DATA_DIR.*") + (format #f "path = ~s;" + (search-input-directory (or native-inputs inputs) + "share/osinfo"))))))))) + (inputs (list libsoup-minimal-2 libxml2 libxslt osinfo-db)) (native-inputs - `(("glib" ,glib "bin") ; glib-mkenums, etc. - ("gobject-introspection" ,gobject-introspection) - ("gtk-doc" ,gtk-doc/stable) - ("vala" ,vala) - ("intltool" ,intltool) - ("pkg-config" ,pkg-config) - ("pci.ids" - ,(origin - (method url-fetch) - (uri "https://github.com/pciutils/pciids/raw/ad02084f0bc143e3c15e31a6152a3dfb1d7a3156/pci.ids") - (sha256 - (base32 - "0kfhpj5rnh24hz2714qhfmxk281vwc2w50sm73ggw5d15af7zfsw")))) - ("usb.ids" - ,(origin - (method url-fetch) - (uri "https://svn.code.sf.net/p/linux-usb/repo/trunk/htdocs/usb.ids?r=2681") - (file-name "usb.ids") - (sha256 - (base32 - "1m6yhvz5k8aqzxgk7xj3jkk8frl1hbv0h3vgj4wbnvnx79qnvz3r")))))) + (list `(,glib "bin") ;glib-mkenums, etc. + gobject-introspection + gtk-doc/stable + `(,hwdata "pci") + `(,hwdata "usb") + vala + intltool + pkg-config)) (home-page "https://libosinfo.org/") (synopsis "Operating system information database") (description "libosinfo is a GObject based library API for managing |