1 { lib, fetchurl, desktop-file-utils, file, python3Packages }:
4 in python3Packages.buildPythonApplication {
9 url = "https://xyne.dev/projects/mimeo/src/mimeo-${version}.tar.xz";
10 hash = "sha256-CahvSypwR1aHVDHTdtty1ZfaKBWPolxc73uZ5OyeqZA=";
13 buildInputs = [ file desktop-file-utils ];
15 propagatedBuildInputs = [ python3Packages.pyxdg ];
18 substituteInPlace Mimeo.py \
19 --replace "EXE_UPDATE_DESKTOP_DATABASE = 'update-desktop-database'" \
20 "EXE_UPDATE_DESKTOP_DATABASE = '${desktop-file-utils}/bin/update-desktop-database'" \
21 --replace "EXE_FILE = 'file'" \
22 "EXE_FILE = '${file}/bin/file'"
25 installPhase = "install -Dm755 Mimeo.py $out/bin/mimeo";
27 doInstallCheck = true;
28 installCheckPhase = ''
29 $out/bin/mimeo --help > /dev/null
33 description = "Open files by MIME-type or file name using regular expressions";
34 homepage = "https://xyne.dev/projects/mimeo/";
35 license = [ licenses.gpl2Only ];
36 maintainers = [ maintainers.rycee ];
37 platforms = platforms.unix;
38 mainProgram = "mimeo";