diff mbox series

[bug#39579,3/3] gnu: virt-manager: Include operating systems list.

Message ID 20200212163711.17468-3-brice@waegenei.re
State Accepted
Headers show
Series Include operating systems list in virt-manager. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job

Commit Message

Brice Waegeneire Feb. 12, 2020, 4:37 p.m. UTC
* gnu/packages/virtualization.scm (virt-manager)[inputs]: Add osinfo-db.
[arguments]: Add phase patch.
---
 gnu/packages/virtualization.scm | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

Comments

Maja Kądziołka Feb. 16, 2020, 7:27 p.m. UTC | #1
On Wed, Feb 12, 2020 at 05:37:11PM +0100, Brice Waegeneire wrote:
> * gnu/packages/virtualization.scm (virt-manager)[inputs]: Add osinfo-db.
> [arguments]: Add phase patch.
> ---
>  gnu/packages/virtualization.scm | 14 ++++++++++++--
>  1 file changed, 12 insertions(+), 2 deletions(-)
> 
> diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm
> index 3769ece889..222d59d8bc 100644
> --- a/gnu/packages/virtualization.scm
> +++ b/gnu/packages/virtualization.scm
> @@ -328,12 +328,22 @@ server and embedded PowerPC, and S390 guests.")
>         (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")))))
> +                            (assoc-ref %build-inputs "pci.ids")))
> +       #:phases
> +       (modify-phases %standard-phases
> +         (add-after 'unpack 'patch
> +           (lambda* (#:key inputs #:allow-other-keys)
> +             (substitute* "osinfo/osinfo_loader.c"
> +               (("path = DATA_DIR.*")
> +                (string-append "path = \"" (assoc-ref inputs "osinfo-db")
> +                               "/share/osinfo\";")))
> +             #t)))))
'patch is somewhat non-descriptive, how about 'patch-osinfo-path ?

>      (inputs
>       `(("libsoup" ,libsoup)
>         ("libxml2" ,libxml2)
>         ("libxslt" ,libxslt)
> -       ("gobject-introspection" ,gobject-introspection)))
> +       ("gobject-introspection" ,gobject-introspection)
> +       ("osinfo-db" ,osinfo-db)))
>      (native-inputs
>       `(("glib" ,glib "bin")  ; glib-mkenums, etc.
>         ("gtk-doc" ,gtk-doc)
> -- 
> 2.25.0
diff mbox series

Patch

diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm
index 3769ece889..222d59d8bc 100644
--- a/gnu/packages/virtualization.scm
+++ b/gnu/packages/virtualization.scm
@@ -328,12 +328,22 @@  server and embedded PowerPC, and S390 guests.")
        (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")))))
+                            (assoc-ref %build-inputs "pci.ids")))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "osinfo/osinfo_loader.c"
+               (("path = DATA_DIR.*")
+                (string-append "path = \"" (assoc-ref inputs "osinfo-db")
+                               "/share/osinfo\";")))
+             #t)))))
     (inputs
      `(("libsoup" ,libsoup)
        ("libxml2" ,libxml2)
        ("libxslt" ,libxslt)
-       ("gobject-introspection" ,gobject-introspection)))
+       ("gobject-introspection" ,gobject-introspection)
+       ("osinfo-db" ,osinfo-db)))
     (native-inputs
      `(("glib" ,glib "bin")  ; glib-mkenums, etc.
        ("gtk-doc" ,gtk-doc)