From: Morgan.J.Smith@outlook.com
To: 44040@debbugs.gnu.org
Cc: Morgan Smith <Morgan.J.Smith@outlook.com>
Subject: [bug#44040] [PATCH 2/2] gnu: Add libguestfs.
Date: Fri, 16 Oct 2020 16:00:53 -0400 [thread overview]
Message-ID: <DM5PR1001MB21057A278B3D910DEAB8492CC5030@DM5PR1001MB2105.namprd10.prod.outlook.com> (raw)
In-Reply-To: <DM5PR1001MB21056B37F10D88430FA3C3DAC5030@DM5PR1001MB2105.namprd10.prod.outlook.com>
From: Morgan Smith <Morgan.J.Smith@outlook.com>
* gnu/packages/virtualization.scm (libguestfs): New variable.
---
gnu/packages/virtualization.scm | 103 ++++++++++++++++++++++++++++++++
1 file changed, 103 insertions(+)
diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm
index ac062dfa15..d958d99330 100644
--- a/gnu/packages/virtualization.scm
+++ b/gnu/packages/virtualization.scm
@@ -16,6 +16,7 @@
;;; Copyright © 2020 Mathieu Othacehe <m.othacehe@gmail.com>
;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2020 Morgan Smith <Morgan.J.Smith@outlook.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -37,13 +38,16 @@
#:use-module (gnu packages admin)
#:use-module (gnu packages assembly)
#:use-module (gnu packages attr)
+ #:use-module (gnu packages augeas)
#:use-module (gnu packages autotools)
#:use-module (gnu packages backup)
#:use-module (gnu packages base)
#:use-module (gnu packages bison)
+ #:use-module (gnu packages cdrom)
#:use-module (gnu packages check)
#:use-module (gnu packages cmake)
#:use-module (gnu packages compression)
+ #:use-module (gnu packages cpio)
#:use-module (gnu packages cross-base)
#:use-module (gnu packages curl)
#:use-module (gnu packages cyrus-sasl)
@@ -63,6 +67,7 @@
#:use-module (gnu packages gnome)
#:use-module (gnu packages gnupg)
#:use-module (gnu packages golang)
+ #:use-module (gnu packages gperf)
#:use-module (gnu packages graphviz)
#:use-module (gnu packages gtk)
#:use-module (gnu packages haskell)
@@ -79,8 +84,10 @@
#:use-module (gnu packages ncurses)
#:use-module (gnu packages nettle)
#:use-module (gnu packages networking)
+ #:use-module (gnu packages ocaml)
#:use-module (gnu packages onc-rpc)
#:use-module (gnu packages package-management)
+ #:use-module (gnu packages pcre)
#:use-module (gnu packages perl)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages polkit)
@@ -2032,3 +2039,99 @@ administrators and developers in managing the database.")
libosinfo library. It provides information about guest operating systems for
use with virtualization provisioning tools")
(license license:lgpl2.0+)))
+
+(define-public libguestfs
+ (package
+ (name "libguestfs")
+ (version "1.42.0")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://download.libguestfs.org/"
+ (version-major+minor version)
+ "-stable/libguestfs-"
+ version
+ ".tar.gz"))
+ (sha256
+ (base32
+ "097hfi53w5lhf3im9l1lrymzv07ksyi1zcmg8bqrg9daycn1kvjg"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(;; XXX: I'm not sure why runpath validation doesn't work
+ #:validate-runpath? #f
+ ;; XXX: It's possible to get at least some of the tests to work
+ #:tests? #f
+ #:configure-flags (list "--disable-gnulib-tests"
+ "--disable-daemon"
+ "--disable-appliance"
+ "--with-distro=none"
+ "--disable-static")
+ ;; Installation is discouraged because users might want to have multiple
+ ;; versions installed at once. For that reason we have to specify
+ ;; "REALLY_INSTALL=yes" to install
+ #:make-flags (list "REALLY_INSTALL=yes")
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'configure 'fix-configure
+ (lambda* (#:key inputs #:allow-other-keys)
+ ;; Our ncurses package doesn't have a binary called
+ ;; "ncurses6-config". It probably should though
+ (substitute* "configure"
+ (("ncurses6-config")
+ "ncursesw6-config"))
+ ;; Hard code paths to ld and file in the configure script
+ (substitute* "configure"
+ (("/usr/bin/ld")
+ (string-append (assoc-ref inputs "ld-wrapper") "/bin/ld"))
+ (("/usr/bin/file")
+ (string-append (assoc-ref inputs "file") "/bin/file")))
+ #t))
+ (add-before 'check 'fix-tests
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((bash (string-append (assoc-ref inputs "bash") "/bin/bash")))
+ (setenv "SHELL" bash))
+ #t))
+ (add-before 'install 'patch-ocaml-installdir
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ ;; Force ocaml installdir to be correct
+ (substitute* "ocaml/Makefile"
+ (("\\$\\(DESTDIR\\)\\$\\(OCAMLLIB\\)")
+ (string-append
+ out "/lib/ocaml/site-lib"))))
+ #t)))))
+ (native-inputs
+ `(("bison" ,bison)
+ ("curl" ,curl)
+ ("flex" ,flex)
+ ("pkg-config" ,pkg-config)))
+ (inputs
+ `(("augeas" ,augeas)
+ ("cdrkit-libre" ,cdrkit-libre)
+ ("cpio" ,cpio)
+ ("fuse" ,fuse)
+ ("gperf" ,gperf)
+ ("gperf" ,gperf)
+ ("jansson" ,jansson)
+ ("libselinux" ,libselinux)
+ ("libtirpc" ,libtirpc)
+ ("libvirt" ,libvirt)
+ ("libxml2" ,libxml2)
+ ("util-linux" ,util-linux) ; getopt
+ ("ncurses" ,ncurses)
+ ("ocaml" ,ocaml)
+ ("ocaml-findlib" ,ocaml-findlib)
+ ("ocaml-hivex" ,ocaml-hivex)
+ ("pcre" ,pcre)
+ ("perl" ,perl)
+ ("qemu" ,qemu)))
+ (home-page "https://libguestfs.org/")
+ (synopsis "Tools for accessing and modifying virtual machine (VM) disk
+images")
+ (description "libguestfs is a C library and a set of tools for accessing
+and modifying virtual disk images used in platform virtualization. The tools
+can be used for viewing and editing virtual machines (VMs) managed by libvirt
+and files inside VMs, scripting changes to VMs, and creating VMs.")
+ ;; The library files are released under LGPLv2.1 or later.
+ ;; The programs ;; are released under GPLv2+.
+ (license (list license:lgpl2.1+ license:gpl2+))))
--
2.28.0
next prev parent reply other threads:[~2020-10-16 20:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-16 19:43 [bug#44040] libguestfs + ocaml-hivex help wanted Morgan Smith
2020-10-16 20:00 ` [bug#44040] [PATCH 1/2] gnu: Add ocaml-hivex Morgan.J.Smith
2020-10-16 20:00 ` Morgan.J.Smith [this message]
2020-10-28 17:19 ` [bug#44040] [PATCH 2/2] gnu: Add libguestfs Joshua Branson via Guix-patches via
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DM5PR1001MB21057A278B3D910DEAB8492CC5030@DM5PR1001MB2105.namprd10.prod.outlook.com \
--to=morgan.j.smith@outlook.com \
--cc=44040@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).