aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages
diff options
context:
space:
mode:
authorRutger Helling <rhelling@mykolab.com>2017-12-28 23:26:42 +0100
committerRutger Helling <rhelling@mykolab.com>2017-12-28 23:58:32 +0100
commit0e5d0f66b56221b7de49ab28b607633e413c9110 (patch)
treebb6ab4007ac30fbb8c9e4723a7708ac518aaa4fe /gnu/packages
parent50c4d676ff65a2e26a5df5745733b8cc16b23bc6 (diff)
downloadpatches-0e5d0f66b56221b7de49ab28b607633e413c9110.tar
patches-0e5d0f66b56221b7de49ab28b607633e413c9110.tar.gz
gnu: qemu: Add wrapper for Samba.
* gnu/packages/virtualization.scm (qemu)[arguments]: Change #:configure-flags to a list, add --smbd flag. Add 'create-samba-wrapper phase.
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/virtualization.scm19
1 files changed, 18 insertions, 1 deletions
diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm
index 0e4feb7b1c..ab37ff2926 100644
--- a/gnu/packages/virtualization.scm
+++ b/gnu/packages/virtualization.scm
@@ -96,7 +96,10 @@
'(;; Running tests in parallel can occasionally lead to failures, like:
;; boot_sector_test: assertion failed (signature == SIGNATURE): (0x00000000 == 0x0000dead)
#:parallel-tests? #f
- #:configure-flags '("--enable-usb-redir" "--enable-opengl")
+ #:configure-flags (list "--enable-usb-redir" "--enable-opengl"
+ (string-append "--smbd="
+ (assoc-ref %outputs "out")
+ "/libexec/samba-wrapper"))
#:phases
(modify-phases %standard-phases
(replace 'configure
@@ -135,6 +138,20 @@
(install-file info infodir))
(find-files "." "\\.info"))
#t))))))
+ ;; Create a wrapper for Samba. This allows QEMU to use Samba without
+ ;; pulling it in as an input. Note that you need to explicitly install
+ ;; Samba in your Guix profile for Samba support.
+ (add-after 'install-info 'create-samba-wrapper
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((out (assoc-ref %outputs "out"))
+ (libexec (string-append out "/libexec")))
+ (call-with-output-file "samba-wrapper"
+ (lambda (port)
+ (format port "#!/bin/sh
+exec smbd $@")))
+ (chmod "samba-wrapper" #o755)
+ (install-file "samba-wrapper" libexec))
+ #t))
(add-before 'check 'make-gtester-verbose
(lambda _
;; Make GTester verbose to facilitate investigation upon failure.