From add4977a91f90db9ae3389e204f9277f4d43ca17 Mon Sep 17 00:00:00 2001
From: Luca Bruno <lucabru@src.gnome.org>
Date: Sat, 12 Apr 2014 16:30:29 +0200
Subject: [PATCH] system-path, gnome3: run update-desktop-database to create
 the mime cache

This allows programs such as yelp to handle help:// protocol schemas
---
 nixos/modules/config/system-path.nix                   | 4 ++++
 nixos/modules/services/x11/desktop-managers/gnome3.nix | 1 +
 2 files changed, 5 insertions(+)

diff --git a/nixos/modules/config/system-path.nix b/nixos/modules/config/system-path.nix
index 1913e17f929d..37d452cf942d 100644
--- a/nixos/modules/config/system-path.nix
+++ b/nixos/modules/config/system-path.nix
@@ -135,6 +135,10 @@ in
           if [ -x $out/bin/glib-compile-schemas -a -w $out/share/glib-2.0/schemas ]; then
               $out/bin/glib-compile-schemas $out/share/glib-2.0/schemas
           fi
+
+          if [ -x $out/bin/update-desktop-database -a -w $out/share/applications ]; then
+              $out/bin/update-desktop-database $out/share/applications
+          fi
         '';
     };
 
diff --git a/nixos/modules/services/x11/desktop-managers/gnome3.nix b/nixos/modules/services/x11/desktop-managers/gnome3.nix
index f7f11ff5f923..7930a6457fdd 100644
--- a/nixos/modules/services/x11/desktop-managers/gnome3.nix
+++ b/nixos/modules/services/x11/desktop-managers/gnome3.nix
@@ -75,6 +75,7 @@ in {
                                                 "${pkgs.glib_networking}/lib/gio/modules" ];
     environment.systemPackages =
       [ gnome3.dconf
+        pkgs.desktop_file_utils
         pkgs.glib_networking
         pkgs.ibus
         gnome3.gnome-backgrounds