diff options
author | Marius Bakke <mbakke@fastmail.com> | 2020-05-08 21:40:51 +0200 |
---|---|---|
committer | Marius Bakke <mbakke@fastmail.com> | 2020-05-08 21:40:51 +0200 |
commit | 4bdf4182fe080c3409f6ef9b410146b67cfa2595 (patch) | |
tree | f1123ddb8c57eda6de026982904f6c5309adaca6 /gnu/services | |
parent | c81457a5883ea43950eb2ecdcbb58a5b144bcd11 (diff) | |
parent | 23a59b180b28b9fa22120c2b8305b9324442b94d (diff) | |
download | guix-4bdf4182fe080c3409f6ef9b410146b67cfa2595.tar guix-4bdf4182fe080c3409f6ef9b410146b67cfa2595.tar.gz |
Merge branch 'core-updates'
Diffstat (limited to 'gnu/services')
-rw-r--r-- | gnu/services/base.scm | 14 | ||||
-rw-r--r-- | gnu/services/shepherd.scm | 39 | ||||
-rw-r--r-- | gnu/services/xorg.scm | 2 |
3 files changed, 30 insertions, 25 deletions
diff --git a/gnu/services/base.scm b/gnu/services/base.scm index b14bbcc3cd..6ea7ef8e7e 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -47,7 +47,7 @@ #:select (alsa-utils crda eudev e2fsprogs fuse gpm kbd lvm2 rng-tools)) #:use-module (gnu packages bash) #:use-module ((gnu packages base) - #:select (canonical-package coreutils glibc glibc-utf8-locales)) + #:select (coreutils glibc glibc-utf8-locales)) #:use-module (gnu packages package-management) #:use-module ((gnu packages gnupg) #:select (guile-gcrypt)) #:use-module (gnu packages linux) @@ -1093,7 +1093,7 @@ the tty to run, among other things." (name-services nscd-configuration-name-services ;list of <packages> (default '())) (glibc nscd-configuration-glibc ;<package> - (default (canonical-package glibc)))) + (default glibc))) (define-record-type* <nscd-cache> nscd-cache make-nscd-cache nscd-cache? @@ -1840,7 +1840,7 @@ archive}). If that is not the case, the service will fail to start." udev-configuration make-udev-configuration udev-configuration? (udev udev-configuration-udev ;<package> - (default eudev/btrfs-fix)) + (default eudev)) (rules udev-configuration-rules ;list of <package> (default '()))) @@ -2038,7 +2038,7 @@ the udev rules in use.") directory dynamically. Get extra rules from the packages listed in the @code{rules} field of its value, @code{udev-configuration} object."))) -(define* (udev-service #:key (udev eudev/btrfs-fix) (rules '())) +(define* (udev-service #:key (udev eudev) (rules '())) "Run @var{udev}, which populates the @file{/dev} directory dynamically. Get extra rules from the packages listed in @var{rules}." (service udev-service-type @@ -2396,9 +2396,7 @@ to handle." (rules (list lvm2 fuse alsa-utils crda)))) (service special-files-service-type - `(("/bin/sh" ,(file-append (canonical-package bash) - "/bin/sh")) - ("/usr/bin/env" ,(file-append (canonical-package coreutils) - "/bin/env")))))) + `(("/bin/sh" ,(file-append bash "/bin/sh")) + ("/usr/bin/env" ,(file-append coreutils "/bin/env")))))) ;;; base.scm ends here diff --git a/gnu/services/shepherd.scm b/gnu/services/shepherd.scm index ecdf2f242e..826a3c2215 100644 --- a/gnu/services/shepherd.scm +++ b/gnu/services/shepherd.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2013, 2014, 2015, 2016, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org> ;;; Copyright © 2018 Carlo Zancanaro <carlo@zancanaro.id.au> +;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -25,6 +26,7 @@ #:use-module (guix store) #:use-module (guix records) #:use-module (guix derivations) ;imported-modules, etc. + #:use-module (guix utils) #:use-module (gnu services) #:use-module (gnu services herd) #:use-module (gnu packages admin) @@ -264,22 +266,27 @@ stored." (define (scm->go file) "Compile FILE, which contains code to be loaded by shepherd's config file, and return the resulting '.go' file." - (with-extensions (list shepherd) - (computed-file (string-append (basename (scheme-file-name file) ".scm") - ".go") - #~(begin - (use-modules (system base compile)) - - ;; Do the same as the Shepherd's 'load-in-user-module'. - (let ((env (make-fresh-user-module))) - (module-use! env (resolve-interface '(oop goops))) - (module-use! env (resolve-interface '(shepherd service))) - (compile-file #$file #:output-file #$output - #:env env))) - - ;; It's faster to build locally than to download. - #:options '(#:local-build? #t - #:substitutable? #f)))) + ;; FIXME: %current-target-system may not be bound <https://bugs.gnu.org/29296> + (let ((target (%current-target-system))) + (with-extensions (list shepherd) + (computed-file (string-append (basename (scheme-file-name file) ".scm") + ".go") + #~(begin + (use-modules (system base compile) + (system base target)) + + ;; Do the same as the Shepherd's 'load-in-user-module'. + (let ((env (make-fresh-user-module))) + (module-use! env (resolve-interface '(oop goops))) + (module-use! env (resolve-interface '(shepherd service))) + (with-target #$(or target #~%host-type) + (lambda _ + (compile-file #$file #:output-file #$output + #:env env))))) + + ;; It's faster to build locally than to download. + #:options '(#:local-build? #t + #:substitutable? #f))))) (define (shepherd-configuration-file services) "Return the shepherd configuration file for SERVICES." diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm index 6441400ffd..2505bde97b 100644 --- a/gnu/services/xorg.scm +++ b/gnu/services/xorg.scm @@ -31,7 +31,7 @@ #:use-module (gnu system keyboard) #:use-module (gnu services base) #:use-module (gnu services dbus) - #:use-module ((gnu packages base) #:select (canonical-package)) + #:use-module (gnu packages base) #:use-module (gnu packages guile) #:use-module (gnu packages xorg) #:use-module (gnu packages fonts) |