xdg_utils: add mimi support

authored by Jan Malakhovski and committed by Luca Bruno a0f50dc6 c88e9def

+25 -8
+25 -8
pkgs/tools/X11/xdg-utils/default.nix
··· 1 - { stdenv, fetchzip, file, libxslt, docbook_xml_dtd_412, docbook_xsl, xmlto 2 - , w3m, which, gnugrep, gnused, coreutils }: 3 4 stdenv.mkDerivation rec { 5 name = "xdg-utils-1.1.0-rc3p7"; ··· 13 # just needed when built from git 14 buildInputs = [ libxslt docbook_xml_dtd_412 docbook_xsl xmlto w3m ]; 15 16 - postInstall = '' 17 for item in $out/bin/*; do 18 substituteInPlace $item --replace "cut " "${coreutils}/bin/cut " 19 substituteInPlace $item --replace "sed " "${gnused}/bin/sed " ··· 24 done 25 ''; 26 27 - meta = { 28 homepage = http://portland.freedesktop.org/wiki/; 29 description = "A set of command line tools that assist applications with a variety of desktop integration tasks"; 30 - license = stdenv.lib.licenses.free; 31 - maintainers = [ stdenv.lib.maintainers.eelco ]; 32 - platforms = stdenv.lib.platforms.linux; 33 }; 34 } 35 -
··· 1 + { stdenv, fetchzip, fetchFromGitHub, file, libxslt, docbook_xml_dtd_412, docbook_xsl, xmlto 2 + , w3m, which, gnugrep, gnused, coreutils 3 + , mimiSupport ? false, gawk ? null }: 4 + 5 + assert mimiSupport -> gawk != null; 6 + 7 + let 8 + # A much better xdg-open 9 + mimisrc = fetchFromGitHub { 10 + owner = "march-linux"; 11 + repo = "mimi"; 12 + rev = "d85ea8256ed627e93b387cd42e4ab39bfab9504c"; 13 + sha256 = "1h9mb3glfvc6pa2f9g07xgmf8lrwxiyjxvl906xlysy4klybxvhg"; 14 + }; 15 + in 16 17 stdenv.mkDerivation rec { 18 name = "xdg-utils-1.1.0-rc3p7"; ··· 26 # just needed when built from git 27 buildInputs = [ libxslt docbook_xml_dtd_412 docbook_xsl xmlto w3m ]; 28 29 + postInstall = stdenv.lib.optionalString mimiSupport '' 30 + cp ${mimisrc}/xdg-open $out/bin/xdg-open 31 + substituteInPlace $out/bin/xdg-open --replace "awk " "${gawk}/bin/awk " 32 + substituteInPlace $out/bin/xdg-open --replace "sort " "${coreutils}/bin/sort " 33 + substituteInPlace $out/bin/xdg-open --replace "(file " "(${file}/bin/file " 34 + '' + '' 35 for item in $out/bin/*; do 36 substituteInPlace $item --replace "cut " "${coreutils}/bin/cut " 37 substituteInPlace $item --replace "sed " "${gnused}/bin/sed " ··· 42 done 43 ''; 44 45 + meta = with stdenv.lib; { 46 homepage = http://portland.freedesktop.org/wiki/; 47 description = "A set of command line tools that assist applications with a variety of desktop integration tasks"; 48 + license = if mimiSupport then licenses.gpl2 else licenses.free; 49 + maintainers = [ maintainers.eelco ]; 50 + platforms = platforms.linux; 51 }; 52 }