Archived
1
0
Fork 0

gnu: avahi: Make all arguments unconditional.

* gnu/packages/avahi.scm (avahi)[origin]: Fix indentation
and remove trailing #t.
[arguments]: Re-integrate conditional arguments.
This commit is contained in:
Maxim Cournoyer 2021-12-17 15:07:20 -05:00
parent 80d8cf6cc6
commit 756188a8da
No known key found for this signature in database
GPG key ID: 1260E46482E63562

View file

@ -43,22 +43,21 @@
(version "0.8") (version "0.8")
(home-page "https://avahi.org") (home-page "https://avahi.org")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append home-page "/download/avahi-" (uri (string-append home-page "/download/avahi-"
version ".tar.gz")) version ".tar.gz"))
(sha256 (sha256
(base32 (base32
"1npdixwxxn3s9q1f365x9n9rc5xgfz39hxf23faqvlrklgbhj0q6")) "1npdixwxxn3s9q1f365x9n9rc5xgfz39hxf23faqvlrklgbhj0q6"))
(patches (search-patches "avahi-localstatedir.patch")) (patches (search-patches "avahi-localstatedir.patch"))
(modules '((guix build utils))) (modules '((guix build utils)))
(snippet (snippet
'(begin '(begin
;; Fix version constraint in the avahi-libevent pkg-config file. ;; Fix version constraint in the avahi-libevent pkg-config file.
;; This can be removed for Avahi versions > 0.8. ;; This can be removed for Avahi versions > 0.8.
(substitute* "avahi-libevent.pc.in" (substitute* "avahi-libevent.pc.in"
(("libevent-2\\.1\\.5") (("libevent-2\\.1\\.5")
"libevent >= 2.1.5")) "libevent >= 2.1.5"))))))
#t))))
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
`(#:configure-flags '("--with-distro=none" `(#:configure-flags '("--with-distro=none"
@ -75,26 +74,20 @@
,@(if (%current-target-system) ,@(if (%current-target-system)
'("ac_cv_prog_have_pkg_config=yes") '("ac_cv_prog_have_pkg_config=yes")
'())) '()))
;; TODO(core-updates): Make this unconditional. #:modules ((srfi srfi-26)
,@(if (%current-target-system) (guix build utils)
`(#:modules ((srfi srfi-26) (guix build gnu-build-system))
(guix build utils) #:phases
(guix build gnu-build-system)) ,#~(modify-phases %standard-phases
#:phases (add-after 'patch-shebangs 'patch-more-shebangs
,#~(modify-phases %standard-phases (lambda* (#:key inputs #:allow-other-keys)
(add-after 'patch-shebangs 'patch-more-shebangs (define path
(lambda* (#:key inputs #:allow-other-keys) `(,(dirname (search-input-file inputs "bin/sh"))))
(define path (for-each
`(,(dirname (search-input-file inputs "bin/sh")))) (cut patch-shebang <> path)
(for-each (find-files (string-append #$output "/etc/avahi"))))))))
(cut patch-shebang <> path)
(find-files (string-append #$output "/etc/avahi")))))))
'())))
(inputs (inputs
;; TODO(core-updates): Make this input unconditional. `(("bash-minimal" ,bash-minimal)
`(,@(if (%current-target-system)
`(("bash-minimal" ,bash-minimal))
'())
("dbus" ,dbus) ("dbus" ,dbus)
("expat" ,expat) ("expat" ,expat)
("gdbm" ,gdbm) ("gdbm" ,gdbm)