profiles: xdg-mime-database: Union the "share/mime/packages" directory.

* guix/profiles.scm (xdg-mime-database): Call 'union-build' for the
"share/mime/packages" directory of inputs.
This commit is contained in:
宋文武 2016-06-11 09:57:11 +08:00
parent 436dd04636
commit 359f06aac8
No known key found for this signature in database
GPG Key ID: 26525665AE727D37
1 changed files with 9 additions and 9 deletions

View File

@ -733,18 +733,18 @@ entries. It's used to query the MIME type of a given file."
(guix build union))
(let* ((datadir (string-append #$output "/share"))
(destdir (string-append datadir "/mime"))
(mimedirs (filter file-exists?
(map (cut string-append <>
"/share/mime")
'#$(manifest-inputs manifest))))
(pkgdirs (filter file-exists?
(map (cut string-append <>
"/share/mime/packages")
'#$(manifest-inputs manifest))))
(update-mime-database (string-append
#+shared-mime-info
"/bin/update-mime-database")))
(mkdir-p datadir)
(union-build destdir mimedirs
#:log-port (%make-void-port "w"))
(setenv "XDG_DATA_HOME" datadir)
(zero? (system* update-mime-database destdir)))))
(mkdir-p destdir)
(union-build (string-append destdir "/packages") pkgdirs
#:log-port (%make-void-port "w"))
(setenv "XDG_DATA_HOME" datadir)
(zero? (system* update-mime-database destdir)))))
;; Don't run the hook when 'shared-mime-info' is referenced.
(if shared-mime-info