<commit_before>{ lib, stdenv
, fetchurl
, pkg-config
, wafHook
, python3
, readline
, libxslt
, docbook-xsl-nons
, docbook_xml_dtd_45
}:

stdenv.mkDerivation rec {
  pname = "tdb";
  version = "1.4.6";

  src = fetchurl {
    url = "mirror://samba/tdb/${pname}-${version}.tar.gz";
    sha256 = "sha256-1okr2L7+BKd2QqHdVuSoeTSb8c9bLAv1+4QQYZON7ws=";
  };

  nativeBuildInputs = [
    python3
    pkg-config
    wafHook
    libxslt
    docbook-xsl-nons
    docbook_xml_dtd_45
  ];

  buildInputs = [
    python3
    readline # required to build python
  ];

  wafPath = "buildtools/bin/waf";

  wafConfigureFlags = [<commit_msg>tdb: fix build with libxcrypt<commit_after>{ lib, stdenv
, fetchurl
, pkg-config
, wafHook
, python3
, readline
, libxslt
, libxcrypt
, docbook-xsl-nons
, docbook_xml_dtd_45
}:

stdenv.mkDerivation rec {
  pname = "tdb";
  version = "1.4.6";

  src = fetchurl {
    url = "mirror://samba/tdb/${pname}-${version}.tar.gz";
    sha256 = "sha256-1okr2L7+BKd2QqHdVuSoeTSb8c9bLAv1+4QQYZON7ws=";
  };

  nativeBuildInputs = [
    python3
    pkg-config
    wafHook
    libxslt
    docbook-xsl-nons
    docbook_xml_dtd_45
  ];

  buildInputs = [
    python3
    readline # required to build python
    libxcrypt
  ];

  wafPath = "buildtools/bin/waf";

  wafConfigureFlags = [
{'fraction_non_alphanumeric': 0.125193199381762, 'fraction_numerical': 0.03863987635239567, 'mean_word_length': 3.124203821656051, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '516202', 'n_tokens_mistral': 595, 'n_tokens_neox': 555, 'n_words': 86}