xdg-mime: make sure the target directories exist

Before the profile commands would not run if a single package is
installed since `buildEnv` will produce a symlink directly to that
package. By adding this dummy package we ensure that a real directory
will be generated.

Fixes #1392
This commit is contained in:
Robert Helgesson 2020-08-15 00:17:24 +02:00
parent 2c6a023744
commit 2bcd96928e
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89

View file

@ -27,6 +27,11 @@ in {
home.packages = [ home.packages = [
# Explicitly install package to provide basic mime types. # Explicitly install package to provide basic mime types.
pkgs.shared-mime-info pkgs.shared-mime-info
# Make sure the target directories will be real directories.
(pkgs.runCommandLocal "dummy-xdg-mime-dirs" { } ''
mkdir -p $out/share/{applications,mime/packages}
'')
]; ];
home.extraProfileCommands = '' home.extraProfileCommands = ''