self: Install 'guix-daemon.cil'.
* guix/self.scm (selinux-policy): New procedure. (miscellaneous-files): Add 'daemon' parameter. Add 'guix-daemon.cil'. (compiled-guix): Adjust call to 'miscellaneous-files'.master
parent
b59c18f761
commit
ca1ea6373a
|
@ -654,7 +654,26 @@ load path."
|
||||||
;; Use a 'guile' variant that doesn't complain about locales.
|
;; Use a 'guile' variant that doesn't complain about locales.
|
||||||
#:guile (quiet-guile guile)))
|
#:guile (quiet-guile guile)))
|
||||||
|
|
||||||
(define (miscellaneous-files source)
|
(define (selinux-policy source daemon)
|
||||||
|
"Return the SELinux policy file taken from SOURCE and adjusted to refer to
|
||||||
|
DAEMON and to the current configuration variables."
|
||||||
|
(define build
|
||||||
|
(with-imported-modules '((guix build utils))
|
||||||
|
#~(begin
|
||||||
|
(use-modules (guix build utils))
|
||||||
|
|
||||||
|
(copy-file #+(file-append* source "/etc/guix-daemon.cil.in")
|
||||||
|
"guix-daemon.cil")
|
||||||
|
(substitute* "guix-daemon.cil"
|
||||||
|
(("@guix_sysconfdir@") #$%sysconfdir)
|
||||||
|
(("@guix_localstatedir@") #$%localstatedir)
|
||||||
|
(("@storedir@") #$%storedir)
|
||||||
|
(("@prefix@") #$daemon))
|
||||||
|
(copy-file "guix-daemon.cil" #$output))))
|
||||||
|
|
||||||
|
(computed-file "guix-daemon.cil" build))
|
||||||
|
|
||||||
|
(define (miscellaneous-files source daemon)
|
||||||
"Return data files taken from SOURCE."
|
"Return data files taken from SOURCE."
|
||||||
(file-mapping "guix-misc"
|
(file-mapping "guix-misc"
|
||||||
`(("etc/bash_completion.d/guix"
|
`(("etc/bash_completion.d/guix"
|
||||||
|
@ -665,6 +684,8 @@ load path."
|
||||||
,(file-append* source "/etc/completion/zsh/_guix"))
|
,(file-append* source "/etc/completion/zsh/_guix"))
|
||||||
("share/fish/vendor_completions.d/guix.fish"
|
("share/fish/vendor_completions.d/guix.fish"
|
||||||
,(file-append* source "/etc/completion/fish/guix.fish"))
|
,(file-append* source "/etc/completion/fish/guix.fish"))
|
||||||
|
("share/selinux/guix-daemon.cil"
|
||||||
|
,(selinux-policy source daemon))
|
||||||
("share/guix/berlin.guix.gnu.org.pub"
|
("share/guix/berlin.guix.gnu.org.pub"
|
||||||
,(file-append* source
|
,(file-append* source
|
||||||
"/etc/substitutes/berlin.guix.gnu.org.pub"))
|
"/etc/substitutes/berlin.guix.gnu.org.pub"))
|
||||||
|
@ -1023,6 +1044,7 @@ itself."
|
||||||
(cond ((= 1 pull-version)
|
(cond ((= 1 pull-version)
|
||||||
;; The whole package, with a standard file hierarchy.
|
;; The whole package, with a standard file hierarchy.
|
||||||
(let* ((modules (built-modules (compose list node-source+compiled)))
|
(let* ((modules (built-modules (compose list node-source+compiled)))
|
||||||
|
(daemon (specification->package "guix-daemon"))
|
||||||
(command (guix-command modules
|
(command (guix-command modules
|
||||||
#:source source
|
#:source source
|
||||||
#:dependencies
|
#:dependencies
|
||||||
|
@ -1038,10 +1060,10 @@ itself."
|
||||||
;; Include 'guix-daemon'. XXX: Here we inject an
|
;; Include 'guix-daemon'. XXX: Here we inject an
|
||||||
;; older snapshot of guix-daemon, but that's a good
|
;; older snapshot of guix-daemon, but that's a good
|
||||||
;; enough approximation for now.
|
;; enough approximation for now.
|
||||||
#:daemon (specification->package "guix-daemon")
|
#:daemon daemon
|
||||||
|
|
||||||
#:info (info-manual source)
|
#:info (info-manual source)
|
||||||
#:miscellany (miscellaneous-files source)
|
#:miscellany (miscellaneous-files source daemon)
|
||||||
#:guile-version guile-version)))
|
#:guile-version guile-version)))
|
||||||
((= 0 pull-version)
|
((= 0 pull-version)
|
||||||
;; Legacy 'guix pull': return the .scm and .go files as one
|
;; Legacy 'guix pull': return the .scm and .go files as one
|
||||||
|
|
Reference in New Issue