@@ -0,0 +1,33 @@
1+{ stdenv, fetchurl, desktop_file_utils, file, python3Packages }:
2+
3+python3Packages.buildPythonApplication rec {
4+ name = "mimeo-${version}";
5+ version = "2016.2";
6+
7+ src = fetchurl {
8+ url = "http://xyne.archlinux.ca/projects/mimeo/src/${name}.tar.xz";
9+ sha256 = "1y3a60983ind2cakjwxq3cgc76xhcdqz5lcpnyii34s6wviybkn1";
10+ };
11+
12+ buildInputs = [ file desktop_file_utils ];
13+
14+ propagatedBuildInputs = [ python3Packages.pyxdg ];
15+
16+ preConfigure = ''
17+ substituteInPlace Mimeo.py \
18+ --replace "EXE_UPDATE_DESKTOP_DATABASE = 'update-desktop-database'" \
19+ "EXE_UPDATE_DESKTOP_DATABASE = '${desktop_file_utils}/bin/update-desktop-database'" \
20+ --replace "EXE_FILE = 'file'" \
21+ "EXE_FILE = '${file}/bin/file'"
22+ '';
23+
24+ installPhase = "install -Dm755 Mimeo.py $out/bin/mimeo";
25+
26+ meta = with stdenv.lib; {
27+ description = "Open files by MIME-type or file name using regular expressions";
28+ homepage = http://xyne.archlinux.ca/projects/mimeo/;
29+ license = [ licenses.gpl2 ];
30+ maintainers = [ maintainers.rycee ];
31+ platforms = platforms.unix;
32+ };
33+}