diff options
author | Ludovic Courtès <ludo@gnu.org> | 2024-08-19 16:34:07 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2024-08-19 16:34:07 +0200 |
commit | 52ac2db924891ed66eb7fb7e6a4bd4af20333a83 (patch) | |
tree | ce6d51187ca0b61cde9d85cb62036320145444c6 | |
parent | 4dc1442cc1eaf7265b277901474de2d82a0089e7 (diff) | |
download | guix-52ac2db924891ed66eb7fb7e6a4bd4af20333a83.tar.gz guix-52ac2db924891ed66eb7fb7e6a4bd4af20333a83.zip |
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
-rw-r--r-- | gnu/services.scm | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/gnu/services.scm b/gnu/services.scm index 610a2df395..526a38fcd9 100644 --- a/gnu/services.scm +++ b/gnu/services.scm @@ -915,9 +915,14 @@ FILES must be a list of name/file-like object pairs." #~(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) |