1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-12-03 16:39:46 +01:00

xdg-mime: fix issue on WSL1

This change stops update-mime-database from running unless the
`share/mime/packages` directory is writable. For some reason it
appears to be read-only on WSL1.

Fixes #1192

(cherry picked from commit 8e8210b441)
This commit is contained in:
Robert Helgesson 2020-06-04 19:45:22 +02:00
parent 3797004203
commit ab911f44e6
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89

View file

@ -30,7 +30,7 @@ in {
];
home.extraProfileCommands = ''
if [[ -w $out/share/mime && -d $out/share/mime/packages ]]; then
if [[ -w $out/share/mime && -w $out/share/mime/packages && -d $out/share/mime/packages ]]; then
XDG_DATA_DIRS=$out/share \
PKGSYSTEM_ENABLE_FSYNC=0 \
${pkgs.buildPackages.shared-mime-info}/bin/update-mime-database \