anchor.diff:  { lib
   , stdenv
   , fetchFromGitLab
  -, fetchpatch
   , openldap
   , libkrb5
   , libxslt
  
positive.code: 
  stdenv.mkDerivation rec {
    pname = "adcli";
    version = "0.9.1";
  
    src = fetchFromGitLab {
      domain = "gitlab.freedesktop.org";
      owner = "realmd";
      repo = pname;
      rev = version;
      sha256 = "sha256-Zzt4qgLiJNuSrbtDWuxJEfGL7sWSbqN301q3qXZpn9c=";
    };
  
    # https://bugs.gentoo.org/820224
    # Without this it produces some weird missing symbol error in glibc
    patches = [
      (fetchpatch {
        url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/app-crypt/adcli/files/adcli-0.9.1-glibc-2.34-resolv.patch?id=01db544de893262e857685e11b33c2a74210181f";
        sha256 = "sha256-dZ6dkzxd+0XjY/X9/2IWMan3syvCDGFHiMbxFxMHGFA=";
      })
    ];
  
    postPatch = ''
      substituteInPlace tools/Makefile.am \
  
negative.code:     patch_docbook doc/adcli-devel.xml
      patch_docbook doc/adcli-docs.xml
    '';
  
    nativeBuildInputs = [ autoreconfHook pkg-config docbook_xsl ];
  
    buildInputs = [ openldap libkrb5 libxslt cyrus_sasl util-linux xmlto docbook_xsl ];
  