anchor.diff:        substituteInPlace configure --replace "/usr/bin/file" "${file}/bin/file"
         sed -i "includes/dhcpd.h" \
   	-"es|^ *#define \+_PATH_DHCLIENT_SCRIPT.*$|#define _PATH_DHCLIENT_SCRIPT \"$out/sbin/dhclient-script\"|g"
  +
  +      export AR='${stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}ar'
       '';
   
     meta = with stdenv.lib; {
  
positive.code:       ./set-hostname.patch
      ];
  
    buildInputs = [ perl makeWrapper openldap ];
  
    configureFlags = [
      "--enable-failover"
  
negative.code:     "--enable-early-chroot"
      "--sysconfdir=/etc"
      "--localstatedir=/var"
      (lib.optional stdenv.isLinux "--with-randomdev=/dev/random")
    ] ++ stdenv.lib.optionals (openldap != null) [ "--with-ldap" "--with-ldapcrypto" ];
  
    NIX_CFLAGS_COMPILE = [ "-Wno-error=pointer-compare" ];
  