anchor.diff:        "--localstatedir=/var"
       ]
       ++ optional (!enableDomainController) "--without-ad-dc"
  -    ++ optionals (!enableLDAP) [ "--without-ldap" "--without-ads" ];
  +    ++ optionals (!enableLDAP) [ "--without-ldap" "--without-ads" ]
  +    ++ optional (!enableAcl) "--without-acl-support"
  +    ++ optional (!enablePam) "--without-pam";
   
     # To build in parallel.
     buildPhase = "python buildtools/bin/waf build -j $NIX_BUILD_CORES";
  
positive.code:     [ ./4.x-no-persistent-install.patch
        ./patch-source3__libads__kerberos_keytab.c.patch
        ./4.x-no-persistent-install-dynconfig.patch
      ];
  
    buildInputs =
      [ python pkgconfig perl libxslt docbook_xsl docbook_xml_dtd_42 /*
        docbook_xml_dtd_45 */ readline talloc popt iniparser
        libbsd libarchive zlib acl fam libiconv gettext libunwind krb5Full
      ]
      ++ optionals stdenv.isLinux [ libaio pam systemd ]
      ++ optionals (enableInfiniband && stdenv.isLinux) [ libibverbs librdmacm ]
      ++ optional enableLDAP openldap
      ++ optional (enablePrinting && stdenv.isLinux) cups
  
negative.code: , enableRegedit ? true
  , enableCephFS ? false
  , enableGlusterFS ? false
  , enableAcl ? (!stdenv.isDarwin)
  , enablePam ? (!stdenv.isDarwin)
  }:
  
  with lib;
  