From: Giacomo Leidi via Guix-patches via <guix-patches@gnu.org>
To: 73260@debbugs.gnu.org
Cc: Giacomo Leidi <goodoldpaul@autistici.org>
Subject: [bug#73260] [PATCH v2 3/3] gnu: Add libguestfs.
Date: Sat, 5 Oct 2024 00:31:44 +0200 [thread overview]
Message-ID: <f3626a3437ed9c245481eaadeb33fbf580ef4af5.1728081104.git.goodoldpaul@autistici.org> (raw)
In-Reply-To: <42a57a06130e77a6471ea9717a670306283ecb51.1728081104.git.goodoldpaul@autistici.org>
* gnu/packages/virtualization.scm (libguestfs): New variable.
Change-Id: I99243550a7a6c9d787fa1a67e54acefd3deeaf1f
---
gnu/packages/virtualization.scm | 90 +++++++++++++++++++++++++++++++++
1 file changed, 90 insertions(+)
diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm
index 4d3d7502f1..bfca5885c6 100644
--- a/gnu/packages/virtualization.scm
+++ b/gnu/packages/virtualization.scm
@@ -61,6 +61,7 @@ (define-module (gnu packages virtualization)
#:use-module (gnu packages apparmor)
#:use-module (gnu packages assembly)
#:use-module (gnu packages attr)
+ #:use-module (gnu packages apparmor)
#:use-module (gnu packages augeas)
#:use-module (gnu packages autotools)
#:use-module (gnu packages backup)
@@ -81,6 +82,7 @@ (define-module (gnu packages virtualization)
#:use-module (gnu packages cryptsetup)
#:use-module (gnu packages curl)
#:use-module (gnu packages cyrus-sasl)
+ #:use-module (gnu packages dbm)
#:use-module (gnu packages debian)
#:use-module (gnu packages disk)
#:use-module (gnu packages dns)
@@ -103,6 +105,7 @@ (define-module (gnu packages virtualization)
#:use-module (gnu packages gperf)
#:use-module (gnu packages graphviz)
#:use-module (gnu packages gtk)
+ #:use-module (gnu packages java)
#:use-module (gnu packages haskell)
#:use-module (gnu packages haskell-apps)
#:use-module (gnu packages haskell-check)
@@ -113,6 +116,7 @@ (define-module (gnu packages virtualization)
#:use-module (gnu packages libbsd)
#:use-module (gnu packages libusb)
#:use-module (gnu packages linux)
+ #:use-module (gnu packages lua)
#:use-module (gnu packages m4)
#:use-module (gnu packages man)
#:use-module (gnu packages multiprecision)
@@ -3138,3 +3142,89 @@ (define-public libguestfs-minimal
guests, P2V, V2V, performing backups, cloning VMs, building VMs, formatting
disks, resizing disks, and much more.")
(license (list license:gpl2+ license:lgpl2.1+))))
+
+(define-public libguestfs
+ (package/inherit libguestfs-minimal
+ (name "libguestfs")
+ (arguments
+ (substitute-keyword-arguments (package-arguments libguestfs-minimal)
+ ((#:configure-flags flags)
+ #~(append
+ (filter
+ (lambda (flag)
+ (not (string-prefix? "LDFLAGS" flag)))
+ #$flags)
+ (list
+ "--enable-vala=yes"
+ (string-append "--with-python-installdir="
+ #$output "/lib/python"
+ #$(version-major+minor
+ (package-version python))
+ "/site-packages")
+ (string-append "LDFLAGS=-Wl,-rpath," %output "/lib"))))
+ ((#:phases phases)
+ #~(modify-phases #$phases
+ (add-after 'patch-makefiles 'patch-additional-makefiles
+ (lambda _
+ (let* ((current-system (or #$(%current-target-system)
+ #$(%current-system)))
+ (lib (string-append #$output "/lib"))
+ (share (string-append #$output "/share"))
+ (completions
+ (string-append share "/bash-completion/completions"))
+ (lib/lua (string-append lib "/lua"))
+ (lib/ocaml (string-append lib "/ocaml"))
+ (ruby-version
+ #$(package-version
+ (this-package-native-input "ruby")))
+ (ruby-libdir
+ (string-append lib
+ "/ruby/site_ruby/"
+ ruby-version))
+ (ruby-archdir
+ (string-append ruby-libdir "/" current-system)))
+ (substitute* "m4/guestfs-bash-completion.m4"
+ (("`pkg-config --variable=completionsdir bash-completion`")
+ completions))
+ (substitute* "ocaml/Makefile.am"
+ (("\\$\\(DESTDIR\\)\\$\\(OCAMLLIB\\)")
+ lib/ocaml))
+ (substitute* "lua/Makefile.am"
+ (("\\$\\(DESTDIR\\)\\$\\(lualibdir\\)")
+ lib/lua))
+ (substitute* "ruby/Makefile.am"
+ (("\\$\\(DESTDIR\\)\\$\\(RUBY_ARCHDIR\\)")
+ ruby-archdir)
+ (("\\$\\(DESTDIR\\)\\$\\(RUBY_LIBDIR\\)")
+ ruby-libdir))
+ ;; The ‘validate-runpath’ phase fails to find libguestfs.so.0.
+ (substitute* "ruby/ext/guestfs/extconf.rb.in"
+ (("create_header")
+ (string-append "
+$LDFLAGS += \" -Wl,-rpath=" #$output "/lib \"
+create_header"))))))))))
+ (native-inputs
+ (modify-inputs (package-native-inputs libguestfs-minimal)
+ (prepend autoconf
+ automake
+ bash-completion
+ cdrtools
+ gobject-introspection
+ python
+ ruby
+ util-linux
+ vala)))
+ (inputs
+ (modify-inputs (package-inputs libguestfs-minimal)
+ (prepend acl
+ bdb
+ fuse
+ gmp
+ libapparmor
+ libcap
+ libcap-ng
+ libconfig
+ libvirt
+ libxcrypt
+ numactl
+ yajl)))))
--
2.46.0
next prev parent reply other threads:[~2024-10-04 22:33 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-14 21:15 [bug#73260] Add libguestfs paul via Guix-patches via
2024-09-14 21:20 ` [bug#73260] [PATCH 1/3] gnu: Add hivex Giacomo Leidi via Guix-patches via
2024-09-14 21:20 ` [bug#73260] [PATCH 2/3] gnu: Add libguestfs-minimal Giacomo Leidi via Guix-patches via
2024-09-30 17:07 ` [bug#73260] Add libguestfs Ludovic Courtès
2024-09-14 21:20 ` [bug#73260] [PATCH 3/3] gnu: " Giacomo Leidi via Guix-patches via
2024-09-30 17:08 ` [bug#73260] " Ludovic Courtès
2024-10-04 22:31 ` paul via Guix-patches via
2024-09-30 17:03 ` Ludovic Courtès
2024-09-16 12:15 ` [bug#73260] Jiri Spacek via Guix-patches
2024-10-04 22:31 ` [bug#73260] [PATCH v2 1/3] gnu: Add hivex Giacomo Leidi via Guix-patches via
2024-10-04 22:31 ` [bug#73260] [PATCH v2 2/3] gnu: Add libguestfs-minimal Giacomo Leidi via Guix-patches via
2024-10-04 22:31 ` Giacomo Leidi via Guix-patches via [this message]
2024-10-07 10:40 ` bug#73260: Add libguestfs Ludovic Courtès
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f3626a3437ed9c245481eaadeb33fbf580ef4af5.1728081104.git.goodoldpaul@autistici.org \
--to=guix-patches@gnu.org \
--cc=73260@debbugs.gnu.org \
--cc=goodoldpaul@autistici.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 external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.