Home Explore Blog CI



nixpkgs

1st chunk of `doc/hooks/desktop-file-utils.section.md`
dc4879f07142df3681cf6b351579c57063c69dd21ddbe9eb000000010000019e
# desktop-file-utils {#desktop-file-utils}

This setup hook removes the MIME cache (located at `$out/share/applications/mimeinfo.cache`) in the `preFixupPhase`.

This hook is necessary because `mimeinfo.cache` can be created when a package uses `desktop-file-utils`, resulting in collisions if multiple packages are installed that contain this file (as in [#48295](https://github.com/NixOS/nixpkgs/issues/48295)).

Title: desktop-file-utils Hook
Summary
The desktop-file-utils setup hook removes the MIME cache file (`$out/share/applications/mimeinfo.cache`) during the `preFixupPhase` to prevent collisions between packages that use `desktop-file-utils` and generate this file.