mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-26 20:49:29 -05:00
services: privileged-program: No libcap when cross-compiling to the Hurd.
* gnu/services.scm (privileged-program->activation-gexp): Add ‘let-system’ form to define staged ‘libcap’ variable. Use ‘supported-package?’ only when not cross-compiling. Change-Id: Ifa9bd97b5dc8c3a162d8427533b41d3c30bac18d
This commit is contained in:
parent
4dc1442cc1
commit
52ac2db924
1 changed files with 8 additions and 3 deletions
|
@ -915,9 +915,14 @@ (define (privileged-program->activation-gexp programs)
|
|||
#~(begin
|
||||
(use-modules (gnu system privilege))
|
||||
|
||||
(activate-privileged-programs (list #$@programs)
|
||||
#$(and (supported-package? libcap)
|
||||
libcap))))))
|
||||
(let ((libcap #$(let-system (system target)
|
||||
;; When cross-compiling, assume libcap is
|
||||
;; available on GNU/Linux only.
|
||||
(and (if target
|
||||
(string-suffix? "linux-gnu" target)
|
||||
(supported-package? libcap system))
|
||||
libcap))))
|
||||
(activate-privileged-programs (list #$@programs) libcap))))))
|
||||
|
||||
(define privileged-program-service-type
|
||||
(service-type (name 'privileged-program)
|
||||
|
|
Loading…
Reference in a new issue