git.iko.soy/typeable/nixpkgs
on master help sign in
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).

commit1e2ae6d818b0b54faf8098a126b32733a8045bd4 authorSebastian Ullrich <sebasti@nullri.ch> dateFri 1 Nov 2019, 15:31 (7 years ago) parent59653b0
1 file changed+1
pkgs/tools/X11/xdg-utils/default.nix+1
pkgs/tools/X11/xdg-utils/default.nix+1
@@ -45,6 +45,7 @@ stdenv.mkDerivation rec {
4545 sort() { ${coreutils}/bin/sort "$@"; }\
4646 xset() { ${xset}/bin/xset "$@"; }\
4747 perl() { PERL5LIB=${perlPath} ${perlPackages.perl}/bin/perl "$@"; }\
48+ mimetype() { ${perlPackages.FileMimeInfo}/bin/mimetype "$@"; }\
4849 &#' -i "$out"/bin/*
4950
5051 substituteInPlace $out/bin/xdg-open \