From 621ed3599103aa5050e71259cb55dd37d60ac31a Mon Sep 17 00:00:00 2001
From: zimbatm <zimbatm@zimbatm.com>
Date: Sun, 20 Mar 2016 00:50:39 +0000
Subject: [PATCH] xdg_utils: fixes #14060

---
 pkgs/tools/X11/xdg-utils/default.nix | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/pkgs/tools/X11/xdg-utils/default.nix b/pkgs/tools/X11/xdg-utils/default.nix
index 7df698dc3ae9..e7233d0f7145 100644
--- a/pkgs/tools/X11/xdg-utils/default.nix
+++ b/pkgs/tools/X11/xdg-utils/default.nix
@@ -39,6 +39,12 @@ stdenv.mkDerivation rec {
       sed "s# $(basename "$tool") # $tool #g" -i "$out"/bin/*
     done
 
+    substituteInPlace $out/bin/xdg-open \
+      --replace "/usr/bin/printf" "${coreutils}/bin/printf"
+
+    substituteInPlace $out/bin/xdg-mime \
+      --replace "/usr/bin/file" "${file}/bin/file"
+
     sed 's# which # type -P #g' -i "$out"/bin/*
   '';