summary refs log tree commit diff
path: root/pkgs/tools/X11
diff options
context:
space:
mode:
authorSebastian Ullrich <sebasti@nullri.ch>2019-11-01 15:31:59 +0100
committerSebastian Ullrich <sebasti@nullri.ch>2019-11-01 15:38:49 +0100
commit1e2ae6d818b0b54faf8098a126b32733a8045bd4 (patch)
treeb357a8fe6c9169b3ffe68eb2b8b253f9fdf7be2b /pkgs/tools/X11
parent59653b0453e25bdbdbfbb33e6e1f77c4f21510f6 (diff)
downloadnixpkgs-1e2ae6d818b0b54faf8098a126b32733a8045bd4.tar
nixpkgs-1e2ae6d818b0b54faf8098a126b32733a8045bd4.tar.gz
nixpkgs-1e2ae6d818b0b54faf8098a126b32733a8045bd4.tar.bz2
nixpkgs-1e2ae6d818b0b54faf8098a126b32733a8045bd4.tar.lz
nixpkgs-1e2ae6d818b0b54faf8098a126b32733a8045bd4.tar.xz
nixpkgs-1e2ae6d818b0b54faf8098a126b32733a8045bd4.tar.zst
nixpkgs-1e2ae6d818b0b54faf8098a126b32733a8045bd4.zip
xdg-utils: fix reference to mimetype
Before this change, xdg-open would impurely look up mimetype in the PATH. While
it would fall back to file if not found, mimetype gives decidedly better output
(e.g. text/csv instead of just text/plain).
Diffstat (limited to 'pkgs/tools/X11')
-rw-r--r--pkgs/tools/X11/xdg-utils/default.nix1
1 files changed, 1 insertions, 0 deletions
diff --git a/pkgs/tools/X11/xdg-utils/default.nix b/pkgs/tools/X11/xdg-utils/default.nix
index e5c4a47b110..99d5df2591a 100644
--- a/pkgs/tools/X11/xdg-utils/default.nix
+++ b/pkgs/tools/X11/xdg-utils/default.nix
@@ -45,6 +45,7 @@ stdenv.mkDerivation rec {
     sort()  { ${coreutils}/bin/sort "$@"; }\
     xset()  { ${xset}/bin/xset      "$@"; }\
     perl()  { PERL5LIB=${perlPath} ${perlPackages.perl}/bin/perl "$@"; }\
+    mimetype() { ${perlPackages.FileMimeInfo}/bin/mimetype "$@"; }\
     &#' -i "$out"/bin/*
 
     substituteInPlace $out/bin/xdg-open \