aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Helgesson <robert@rycee.net>2020-08-15 00:17:24 +0200
committerRobert Helgesson <robert@rycee.net>2020-08-15 00:17:24 +0200
commit2bcd96928e1f831f8cedff76ac733df9f1f5e0fe (patch)
tree43d4ae981c5f147202491f58f2a8f0fc30f6e5d2
parent2c6a02374467a6fb074f548f89f8e8d1d6f2cd12 (diff)
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
-rw-r--r--modules/misc/xdg-mime.nix5
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/misc/xdg-mime.nix b/modules/misc/xdg-mime.nix
index f41e3160f66..598cab91326 100644
--- a/modules/misc/xdg-mime.nix
+++ b/modules/misc/xdg-mime.nix
@@ -27,6 +27,11 @@ in {
home.packages = [
# Explicitly install package to provide basic mime types.
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 = ''