lol
at 22.05-pre 33 lines 1.1 kB view raw
1{ lib, fetchurl, desktop-file-utils, file, python3Packages }: 2 3python3Packages.buildPythonApplication rec { 4 pname = "mimeo"; 5 version = "2021.2"; 6 7 src = fetchurl { 8 url = "https://xyne.archlinux.ca/projects/mimeo/src/${pname}-${version}.tar.xz"; 9 sha256 = "113ip024ggajjdx0l406g6lwypdrddxz6k3640y6lzqjivcgybjf"; 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 lib; { 27 description = "Open files by MIME-type or file name using regular expressions"; 28 homepage = "https://xyne.archlinux.ca/projects/mimeo/"; 29 license = [ licenses.gpl2 ]; 30 maintainers = [ maintainers.rycee ]; 31 platforms = platforms.unix; 32 }; 33}