From 308af63460c37e0d2a58f78aa9118404de3d54ad Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Thu, 18 Jul 2019 18:28:19 +0200 Subject: [PATCH] gnu: libvirt: Provide ''. * gnu/packages/virtualization.scm (libvirt)[inputs]: Add LIBTIRPC. [arguments]: Add phase 'patch-libtirpc-file-names'. --- gnu/packages/virtualization.scm | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm index 0a61e4403e..da971a8805 100644 --- a/gnu/packages/virtualization.scm +++ b/gnu/packages/virtualization.scm @@ -62,6 +62,7 @@ (define-module (gnu packages virtualization) #:use-module (gnu packages ncurses) #:use-module (gnu packages nettle) #:use-module (gnu packages networking) + #:use-module (gnu packages onc-rpc) #:use-module (gnu packages package-management) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) @@ -423,6 +424,15 @@ (define-public libvirt (substitute* "config.h.in" (("/bin/sh") (which "sh"))) #t)) + (add-before 'configure 'patch-libtirpc-file-names + (lambda* (#:key inputs #:allow-other-keys) + ;; libvirt uses an m4 macro instead of pkg-config to determine where + ;; the RPC headers are located. Tell it to look in the right place. + (substitute* "configure" + (("/usr/include/tirpc") ;defined in m4/virt-xdr.m4 + (string-append (assoc-ref inputs "libtirpc") + "/include/tirpc"))) + #t)) (add-before 'configure 'disable-broken-tests (lambda _ (let ((tests (list "commandtest" ; hangs idly @@ -459,8 +469,9 @@ (define-public libvirt ("qemu" ,qemu) ("libpcap" ,libpcap) ("libnl" ,libnl) + ("libtirpc" ,libtirpc) ;for ("libuuid" ,util-linux) - ("lvm2" ,lvm2) ; for libdevmapper + ("lvm2" ,lvm2) ;for libdevmapper ("curl" ,curl) ("openssl" ,openssl) ("cyrus-sasl" ,cyrus-sasl)