mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-23 02:59:17 -05:00
system: Make sure fonts are searched for in the system profile.
This fixes a bug whereby fonts in /run/current-system/profile would be invisible to Fontconfig. * gnu/packages/fontutils.scm (fontconfig): Add comment about system profile not being searched. * gnu/system/shadow.scm (default-skeletons)[fonts.conf-content, fonts.conf]: New variable. Add FONTS.CONF to the skeletons.
This commit is contained in:
parent
0bd3597bbe
commit
e71ef7adae
2 changed files with 27 additions and 0 deletions
|
@ -94,8 +94,12 @@ (define-public fontconfig
|
||||||
(string-append "--with-default-fonts="
|
(string-append "--with-default-fonts="
|
||||||
(assoc-ref %build-inputs "gs-fonts")
|
(assoc-ref %build-inputs "gs-fonts")
|
||||||
"/share/fonts")
|
"/share/fonts")
|
||||||
|
|
||||||
;; register fonts from user profile
|
;; register fonts from user profile
|
||||||
|
;; TODO: Add /run/current-system/profile/share/fonts and remove
|
||||||
|
;; the skeleton that works around it from 'default-skeletons'.
|
||||||
"--with-add-fonts=~/.guix-profile/share/fonts"
|
"--with-add-fonts=~/.guix-profile/share/fonts"
|
||||||
|
|
||||||
;; python is not actually needed
|
;; python is not actually needed
|
||||||
"PYTHON=false")
|
"PYTHON=false")
|
||||||
#:phases
|
#:phases
|
||||||
|
|
|
@ -131,6 +131,12 @@ (define %base-user-accounts
|
||||||
(define (default-skeletons)
|
(define (default-skeletons)
|
||||||
"Return the default skeleton files for /etc/skel. These files are copied by
|
"Return the default skeleton files for /etc/skel. These files are copied by
|
||||||
'useradd' in the home directory of newly created user accounts."
|
'useradd' in the home directory of newly created user accounts."
|
||||||
|
(define fonts.conf-content
|
||||||
|
;; SXML for ~/.config/fontconfig/fonts.conf. This works around the fact
|
||||||
|
;; that Fontconfig currently does not such this directory by default,
|
||||||
|
;; thereby ignoring fonts installed system-wide (FIXME).
|
||||||
|
`(fontconfig (dir "/run/current-system/profile/share/fonts")))
|
||||||
|
|
||||||
(define copy-guile-wm
|
(define copy-guile-wm
|
||||||
#~(begin
|
#~(begin
|
||||||
(use-modules (guix build utils))
|
(use-modules (guix build utils))
|
||||||
|
@ -174,6 +180,22 @@ (define copy-guile-wm
|
||||||
(xdefaults (plain-file "Xdefaults" "\
|
(xdefaults (plain-file "Xdefaults" "\
|
||||||
XTerm*utf8: always
|
XTerm*utf8: always
|
||||||
XTerm*metaSendsEscape: true\n"))
|
XTerm*metaSendsEscape: true\n"))
|
||||||
|
(fonts.conf (computed-file
|
||||||
|
"fonts.conf"
|
||||||
|
#~(begin
|
||||||
|
(use-modules (guix build utils)
|
||||||
|
(sxml simple))
|
||||||
|
|
||||||
|
(define dir
|
||||||
|
(string-append #$output
|
||||||
|
"/fontconfig"))
|
||||||
|
|
||||||
|
(mkdir-p dir)
|
||||||
|
(call-with-output-file (string-append dir
|
||||||
|
"/fonts.conf")
|
||||||
|
(lambda (port)
|
||||||
|
(sxml->xml '#$fonts.conf-content port))))
|
||||||
|
#:modules '((guix build utils))))
|
||||||
(gdbinit (plain-file "gdbinit" "\
|
(gdbinit (plain-file "gdbinit" "\
|
||||||
# Tell GDB where to look for separate debugging files.
|
# Tell GDB where to look for separate debugging files.
|
||||||
set debug-file-directory ~/.guix-profile/lib/debug\n")))
|
set debug-file-directory ~/.guix-profile/lib/debug\n")))
|
||||||
|
@ -182,6 +204,7 @@ (define copy-guile-wm
|
||||||
(".zlogin" ,zlogin)
|
(".zlogin" ,zlogin)
|
||||||
(".Xdefaults" ,xdefaults)
|
(".Xdefaults" ,xdefaults)
|
||||||
(".guile-wm" ,guile-wm)
|
(".guile-wm" ,guile-wm)
|
||||||
|
(".config" ,fonts.conf)
|
||||||
(".gdbinit" ,gdbinit))))
|
(".gdbinit" ,gdbinit))))
|
||||||
|
|
||||||
(define (skeleton-directory skeletons)
|
(define (skeleton-directory skeletons)
|
||||||
|
|
Loading…
Reference in a new issue