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:
parent
3797004203
commit
ab911f44e6
|
@ -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 \
|
||||
|
|
Loading…
Reference in a new issue