xdg/mime.nix: ensure $out/share/mime/packages exists

For update-mime-database to work, you must have to have some mime
packages installed. In some DEs like XFCE this is not guaranteed to
happen. In that case just skip the update-mime-database call.

Fixes #46162
This commit is contained in:
Matthew Bauer 2018-09-08 16:38:51 -05:00
parent d2ab091dd3
commit fb0e0dcbc6

View File

@ -23,7 +23,7 @@ with lib;
];
environment.extraSetup = ''
if [ -w $out/share/mime ]; then
if [ -w $out/share/mime ] && [ -d $out/share/mime/packages ]; then
XDG_DATA_DIRS=$out/share ${pkgs.shared-mime-info}/bin/update-mime-database -V $out/share/mime > /dev/null
fi