anchor.diff:  , libmatroska
   , libogg
   , libvorbis
  +, pugixml
   , qt5
   , xdg-utils
   , zlib
  -# pugixml (not packaged)
   }:
   
   with {
  
positive.code:     libmatroska
      libogg
      libvorbis
      qt5.qtbase
      xdg-utils
      zlib
    ];
  
    postPatch = ''
      patchShebangs ./rake.d/
      patchShebangs ./Rakefile
    '' +
    /* Force ruby encoding to UTF-8 or else when enabling qt5 the
       Rakefile mayfail with `invalid byte sequence in US-ASCII'
       due to UTF-8 characters. This workaround replaces an
       arbitrary comment in the drake file. */ ''
      sed -i ./drake \
        -e 's,#--,Encoding.default_external = Encoding::UTF_8,'
    '';
  
    configureFlags = [
  
negative.code:     wtFlag;
  };
  
  assert qt5 != null -> qt5.qtbase != null;
  
  stdenv.mkDerivation rec {
    name = "mkvtoolnix-${version}";
    version = "8.9.0";
  
    src = fetchurl {
      url = "http://www.bunkus.org/videotools/mkvtoolnix/sources/${name}.tar.xz";
      sha256 = "1m50m8lkfpk0663zhhx9alvprf2y6b4lj9wj29xn3a1rjf2b421j";
    };
  
    nativeBuildInputs = [
  