xdg_utils: add mimi support
This commit is contained in:
parent
c88e9deff4
commit
a0f50dc665
|
@ -1,5 +1,18 @@
|
||||||
{ stdenv, fetchzip, file, libxslt, docbook_xml_dtd_412, docbook_xsl, xmlto
|
{ stdenv, fetchzip, fetchFromGitHub, file, libxslt, docbook_xml_dtd_412, docbook_xsl, xmlto
|
||||||
, w3m, which, gnugrep, gnused, coreutils }:
|
, w3m, which, gnugrep, gnused, coreutils
|
||||||
|
, mimiSupport ? false, gawk ? null }:
|
||||||
|
|
||||||
|
assert mimiSupport -> gawk != null;
|
||||||
|
|
||||||
|
let
|
||||||
|
# A much better xdg-open
|
||||||
|
mimisrc = fetchFromGitHub {
|
||||||
|
owner = "march-linux";
|
||||||
|
repo = "mimi";
|
||||||
|
rev = "d85ea8256ed627e93b387cd42e4ab39bfab9504c";
|
||||||
|
sha256 = "1h9mb3glfvc6pa2f9g07xgmf8lrwxiyjxvl906xlysy4klybxvhg";
|
||||||
|
};
|
||||||
|
in
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "xdg-utils-1.1.0-rc3p7";
|
name = "xdg-utils-1.1.0-rc3p7";
|
||||||
|
@ -13,7 +26,12 @@ stdenv.mkDerivation rec {
|
||||||
# just needed when built from git
|
# just needed when built from git
|
||||||
buildInputs = [ libxslt docbook_xml_dtd_412 docbook_xsl xmlto w3m ];
|
buildInputs = [ libxslt docbook_xml_dtd_412 docbook_xsl xmlto w3m ];
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = stdenv.lib.optionalString mimiSupport ''
|
||||||
|
cp ${mimisrc}/xdg-open $out/bin/xdg-open
|
||||||
|
substituteInPlace $out/bin/xdg-open --replace "awk " "${gawk}/bin/awk "
|
||||||
|
substituteInPlace $out/bin/xdg-open --replace "sort " "${coreutils}/bin/sort "
|
||||||
|
substituteInPlace $out/bin/xdg-open --replace "(file " "(${file}/bin/file "
|
||||||
|
'' + ''
|
||||||
for item in $out/bin/*; do
|
for item in $out/bin/*; do
|
||||||
substituteInPlace $item --replace "cut " "${coreutils}/bin/cut "
|
substituteInPlace $item --replace "cut " "${coreutils}/bin/cut "
|
||||||
substituteInPlace $item --replace "sed " "${gnused}/bin/sed "
|
substituteInPlace $item --replace "sed " "${gnused}/bin/sed "
|
||||||
|
@ -24,12 +42,11 @@ stdenv.mkDerivation rec {
|
||||||
done
|
done
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = with stdenv.lib; {
|
||||||
homepage = http://portland.freedesktop.org/wiki/;
|
homepage = http://portland.freedesktop.org/wiki/;
|
||||||
description = "A set of command line tools that assist applications with a variety of desktop integration tasks";
|
description = "A set of command line tools that assist applications with a variety of desktop integration tasks";
|
||||||
license = stdenv.lib.licenses.free;
|
license = if mimiSupport then licenses.gpl2 else licenses.free;
|
||||||
maintainers = [ stdenv.lib.maintainers.eelco ];
|
maintainers = [ maintainers.eelco ];
|
||||||
platforms = stdenv.lib.platforms.linux;
|
platforms = platforms.linux;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue