From fb0e0dcbc65a7b54bcf98b37b16b06412f0b042f Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Sat, 8 Sep 2018 16:38:51 -0500 Subject: [PATCH] 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 --- nixos/modules/config/xdg/mime.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/config/xdg/mime.nix b/nixos/modules/config/xdg/mime.nix index f1b672234a34..eb8ac2a54ace 100644 --- a/nixos/modules/config/xdg/mime.nix +++ b/nixos/modules/config/xdg/mime.nix @@ -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