anchor.diff:      "--with-xkb-base=${xkeyboard_config}/etc/X11/xkb"
       "--with-xkb-bin-base=${xorg.xkbcomp}/bin"
       "--disable-xmodmap-support"
  -    "--enable-gtk-doc"
  +    "${if withDoc then "--enable-gtk-doc" else "--disable-gtk-doc"}"
     ];
   
     meta = with lib; {
  
positive.code: { lib, stdenv, fetchgit, autoreconfHook, pkg-config, gtk-doc, xkeyboard_config, libxml2, xorg, docbook_xsl
  , glib, isocodes, gobject-introspection }:
  
  stdenv.mkDerivation rec {
    pname = "libxklavier";
  
negative.code: 
    patches = [ ./honor-XKB_CONFIG_ROOT.patch ];
  
    outputs = [ "out" "dev" ] ++ lib.optionals withDoc [ "devdoc" ];
  
    # TODO: enable xmodmap support, needs xmodmap DB
    propagatedBuildInputs = with xorg; [ libX11 libXi xkeyboard_config libxml2 libICE glib libxkbfile isocodes ];
  
    nativeBuildInputs = [ autoreconfHook pkg-config gtk-doc docbook_xsl gobject-introspection ];
  
    preAutoreconf = ''
      export NOCONFIGURE=1
  