anchor.diff:    '';
   
     meta = with stdenv.lib; {
  -    homepage = https://www.samba.org/;
  +    homepage = "https://www.samba.org";
       description = "The standard Windows interoperability suite of programs for Linux and Unix";
       license = licenses.gpl3;
       platforms = platforms.unix;
  
positive.code: 
    outputs = [ "out" "dev" "man" ];
  
    patches =
      [ ./4.x-no-persistent-install.patch
        ./patch-source3__libads__kerberos_keytab.c.patch
        ./4.x-no-persistent-install-dynconfig.patch
        ./4.x-fix-makeflags-parsing.patch
      ];
  
    nativeBuildInputs = optionals stdenv.isDarwin [ rpcgen fixDarwinDylibNames ];
  
    buildInputs =
      [ python pkgconfig perl libxslt docbook_xsl docbook_xml_dtd_42 /*
        docbook_xml_dtd_45 */ readline popt iniparser jansson
        libbsd libarchive zlib fam libiconv gettext libunwind krb5Full
      ]
      ++ optionals stdenv.isLinux [ libaio systemd ]
      ++ optional enableLDAP openldap
      ++ optional (enablePrinting && stdenv.isLinux) cups
      ++ optional enableMDNS avahi
      ++ optionals enableDomainController [ gnutls gpgme lmdb ]
      ++ optional enableRegedit ncurses
      ++ optional (enableCephFS && stdenv.isLinux) libceph
      ++ optional (enableGlusterFS && stdenv.isLinux) glusterfs
      ++ optional enableAcl acl
      ++ optional enablePam pam;
  
  
negative.code:        --replace "bld.SAMBA_BINARY('resolvconftest'" "True or bld.SAMBA_BINARY('resolvconftest'"
    '';
  
    configureFlags = [
      "--with-static-modules=NONE"
      "--with-shared-modules=ALL"
      "--with-system-mitkrb5"
      "--with-system-mitkdc" krb5Full
      "--enable-fhs"
      "--sysconfdir=/etc"
      "--localstatedir=/var"
      "--disable-rpath"
    ] ++ singleton (if enableDomainController
           then "--with-experimental-mit-ad-dc"
           else "--without-ad-dc")
      ++ optionals (!enableLDAP) [ "--without-ldap" "--without-ads" ]
      ++ optional (!enableAcl) "--without-acl-support"
      ++ optional (!enablePam) "--without-pam";
  
    preBuild = ''
      export MAKEFLAGS="-j $NIX_BUILD_CORES"
    '';
  
    # Some libraries don't have /lib/samba in RPATH but need it.
  