Skip to content

Commit

Permalink
xdg/mime.nix: ensure $out/share/mime/packages exists
Browse files Browse the repository at this point in the history
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
  • Loading branch information
matthewbauer committed Sep 8, 2018
1 parent d2ab091 commit fb0e0dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nixos/modules/config/xdg/mime.nix
Expand Up @@ -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
Expand Down

0 comments on commit fb0e0dc

Please sign in to comment.