anchor.diff:  
   assert qt4Support -> qt4 != null;
   
  -let
  -  # despite the configure script claiming it supports $PKG_CONFIG, it doesnt respect it
  -  pkg-config-helper = writeShellScriptBin "pkg-config" ''exec $PKG_CONFIG "$@"'';
  -in
  -
   stdenv.mkDerivation rec {
     pname = "avahi${lib.optionalString withLibdnssdCompat "-compat"}";
     version = "0.8";
  
positive.code: 
    NIX_CFLAGS_COMPILE = "-DAVAHI_SERVICE_DIR=\"/etc/avahi/services\"";
  
    prePatch = ''
      substituteInPlace configure \
        --replace pkg-config "$PKG_CONFIG"
    '';
  
    preBuild = lib.optionalString stdenv.isDarwin ''
      sed -i '20 i\
      #define __APPLE_USE_RFC_2292' \
  
negative.code:     })
    ];
  
    depsBuildBuild = [
      pkg-config
    ];
  
    nativeBuildInputs = [
      pkg-config
      gettext
      glib
    ];
  