anchor.diff:    # just needed when built from git
     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
         substituteInPlace $item --replace "cut " "${coreutils}/bin/cut "
         substituteInPlace $item --replace "sed " "${gnused}/bin/sed "
  
positive.code: { stdenv, fetchzip, file, libxslt, docbook_xml_dtd_412, docbook_xsl, xmlto
  , w3m, which, gnugrep, gnused, coreutils }:
  
  stdenv.mkDerivation rec {
    name = "xdg-utils-1.1.0-rc3p7";
  
negative.code:     done
    '';
  
    meta = with stdenv.lib; {
      homepage = http://portland.freedesktop.org/wiki/;
      description = "A set of command line tools that assist applications with a variety of desktop integration tasks";
      license = if mimiSupport then licenses.gpl2 else licenses.free;
      maintainers = [ maintainers.eelco ];
      platforms = platforms.linux;
    };
  }
  