mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: localed: Modernize.
* gnu/packages/freedesktop.scm (localed) [arguments]: Use gexps. [native-inputs, inputs]: Use modify-inputs and drop labels. Change-Id: I01f06685cd3b9d731dd36f27c32da8ecce0eb2c7
This commit is contained in:
parent
d262248c55
commit
383f7f5c89
1 changed files with 68 additions and 67 deletions
|
@ -1122,22 +1122,24 @@ This library provides just sd-bus (and the busctl utility).")
|
|||
"idn"
|
||||
"nss-myhostname"
|
||||
"nss-systemd")))
|
||||
`(#:configure-flags ',(map (lambda (component)
|
||||
(list
|
||||
#:configure-flags #~(list
|
||||
#$@(map (lambda (component)
|
||||
(string-append "-D" component "=false"))
|
||||
(delete "localed" components))
|
||||
(delete "localed" components)))
|
||||
|
||||
;; It doesn't make sense to test all of systemd.
|
||||
#:tests? #f
|
||||
|
||||
#:phases
|
||||
(modify-phases %standard-phases
|
||||
#~(modify-phases %standard-phases
|
||||
(add-after 'unpack 'set-xkeyboard-config-file-name
|
||||
(lambda* (#:key inputs #:allow-other-keys)
|
||||
(lambda _
|
||||
;; Set the file name to xkeyboard-config and kbd.
|
||||
;; This is used by 'localectl list-x11-keymap-layouts'
|
||||
;; and similar functions.
|
||||
(let ((xkb (assoc-ref inputs "xkeyboard-config"))
|
||||
(kbd (assoc-ref inputs "kbd")))
|
||||
(let ((xkb #$(this-package-input "xkeyboard-config"))
|
||||
(kbd #$(this-package-input "kbd")))
|
||||
(substitute* "src/locale/localectl.c"
|
||||
(("/usr/share/X11/xkb/rules")
|
||||
(string-append xkb "/share/X11/xkb/rules")))
|
||||
|
@ -1145,10 +1147,10 @@ This library provides just sd-bus (and the busctl utility).")
|
|||
(("/usr/share/keymaps")
|
||||
(string-append kbd "/share/keymaps"))))))
|
||||
(replace 'install
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
(lambda _
|
||||
;; Install 'localed', the D-Bus and polkit files, and
|
||||
;; 'localectl'.
|
||||
(let* ((out (assoc-ref outputs "out"))
|
||||
(let* ((out #$output)
|
||||
(libexec (string-append out "/libexec/localed"))
|
||||
(bin (string-append out "/bin"))
|
||||
(lib (string-append out "/lib"))
|
||||
|
@ -1167,16 +1169,13 @@ This library provides just sd-bus (and the busctl utility).")
|
|||
(string-append libexec "/localed"))
|
||||
(install-file "localectl" bin)
|
||||
|
||||
(let ((service-file (source-file
|
||||
"\\.locale1\\.service$")))
|
||||
(let ((service-file (source-file "\\.locale1\\.service$")))
|
||||
(substitute* service-file
|
||||
(("^Exec=.*$")
|
||||
(string-append "Exec=" libexec "/localed\n")))
|
||||
(install-file service-file dbus))
|
||||
(install-file (source-file "\\.locale1\\.policy$")
|
||||
polkit)
|
||||
(install-file (source-file "\\.locale1\\.conf$")
|
||||
conf)
|
||||
(install-file (source-file "\\.locale1\\.policy$") polkit)
|
||||
(install-file (source-file "\\.locale1\\.conf$") conf)
|
||||
(for-each (lambda (file)
|
||||
(install-file file lib))
|
||||
(find-files "src/shared"
|
||||
|
@ -1188,12 +1187,14 @@ This library provides just sd-bus (and the busctl utility).")
|
|||
(find-files
|
||||
".."
|
||||
"^(kbd-model-map|language-fallback-map)$")))))))))
|
||||
(native-inputs `(,@(package-native-inputs elogind)
|
||||
("rsync" ,rsync)))
|
||||
(inputs `(("libmount" ,util-linux "lib")
|
||||
("xkeyboard-config" ,xkeyboard-config)
|
||||
("kbd" ,kbd)
|
||||
,@(package-inputs elogind)))
|
||||
(native-inputs
|
||||
(modify-inputs (package-native-inputs elogind)
|
||||
(append rsync)))
|
||||
(inputs
|
||||
(modify-inputs (package-inputs elogind)
|
||||
(prepend `(,util-linux "lib")
|
||||
kbd
|
||||
xkeyboard-config)))
|
||||
(home-page "https://www.freedesktop.org/wiki/Software/systemd/localed/")
|
||||
(synopsis "Control the system locale and keyboard layout")
|
||||
(description
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue