<commit_before>{ stdenv, fetchFromGitHub, autoconf, automake, gtk-doc, pkgconfig, libuuid,
  libtool, readline, gobject-introspection, json-glib, lvm2, libxslt, docbook_xsl }:

stdenv.mkDerivation rec {
   pname = "ldmtool";
   version = "0.2.4";

   src = fetchFromGitHub {
     owner = "mdbooth";
     repo = "libldm";
     rev = "libldm-${version}";
     sha256 = "1fy5wbmk8kwl86lzswq0d1z2j5y023qzfm2ppm8knzv9c47kniqk";
   };

   preConfigure = ''
     sed -i docs/reference/ldmtool/Makefile.am \
       -e 's|-nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl|--nonet ${docbook_xsl}/xml/xsl/docbook/manpages/docbook.xsl|g'
   '';

   # ldm.c:951:5: error: 'g_type_class_add_private' is deprecated [-Werror=deprecated-declarations]
   NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-declarations";

   configureScript = "sh autogen.sh";
<commit_msg>ldmtool: fix build with glib-2.62<commit_after>{ stdenv, fetchFromGitHub, autoconf, automake, gtk-doc, pkgconfig, libuuid,
  libtool, readline, gobject-introspection, json-glib, lvm2, libxslt, docbook_xsl
, fetchpatch }:

stdenv.mkDerivation rec {
   pname = "ldmtool";
   version = "0.2.4";

   src = fetchFromGitHub {
     owner = "mdbooth";
     repo = "libldm";
     rev = "libldm-${version}";
     sha256 = "1fy5wbmk8kwl86lzswq0d1z2j5y023qzfm2ppm8knzv9c47kniqk";
   };

  patches = [
    # Remove useage of deprecrated G_PARAM_PRIVATE
    (fetchpatch {
      url = "https://github.com/mdbooth/libldm/commit/ee1b37a034038f09d61b121cc8b3651024acc46f.patch";
      sha256 = "02y34kbcpcpffvy1n9yqngvdldmxmvdkha1v2xjqvrnclanpigcp";
    })
  ];

   preConfigure = ''
     sed -i docs/reference/ldmtool/Makefile.am \
       -e 's|-nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl|--nonet ${docbook_xsl}/xml/xsl/docbook/manpages/docbook.xsl|g'
   '';

   # glib-2.62 deprecations
   NIX_CFLAGS_COMPILE = [ "-DGLIB_DISABLE_DEPRECATION_WARNINGS" ];

   configureScript = "sh autogen.sh";

{'fraction_non_alphanumeric': 0.13531187122736418, 'fraction_numerical': 0.04778672032193159, 'mean_word_length': 3.875, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '4721133', 'n_tokens_mistral': 892, 'n_tokens_neox': 819, 'n_words': 112}