<commit_before>{ lib, stdenv, fetchurl, barcode, gnome, autoreconfHook
, gtk3, gtk-doc, libxml2, librsvg , libtool, libe-book, gsettings-desktop-schemas
, intltool, itstool, makeWrapper, pkg-config, yelp-tools
}:

stdenv.mkDerivation rec {
  pname = "glabels";
  version = "3.4.1";

  src = fetchurl {
    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
    sha256 = "0f2rki8i27pkd9r0gz03cdl1g4vnmvp0j49nhxqn275vi8lmgr0q";
  };

  nativeBuildInputs = [ autoreconfHook pkg-config makeWrapper intltool ];
  buildInputs = [
    barcode gtk3 gtk-doc yelp-tools
    gnome.gnome-common gsettings-desktop-schemas
    itstool libxml2 librsvg libe-book libtool
  ];

  preFixup = ''
    wrapProgram "$out/bin/glabels-3" \
      --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH"
  '';

  passthru = {
    updateScript = gnome.updateScript {
      packageName = pname;
      versionPolicy = "none";
    };
  };
<commit_msg>glabels: pull fix pending upstream inclusion for -fno-common toolchain support<commit_after>{ lib, stdenv, fetchurl, fetchpatch, barcode, gnome, autoreconfHook
, gtk3, gtk-doc, libxml2, librsvg , libtool, libe-book, gsettings-desktop-schemas
, intltool, itstool, makeWrapper, pkg-config, yelp-tools
}:

stdenv.mkDerivation rec {
  pname = "glabels";
  version = "3.4.1";

  src = fetchurl {
    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
    sha256 = "0f2rki8i27pkd9r0gz03cdl1g4vnmvp0j49nhxqn275vi8lmgr0q";
  };

  patches = [
    # Pull patch pending upstream inclusion for -fno-common toolchain support:
    #   https://github.com/jimevins/glabels/pull/76
    (fetchpatch {
      name = "fno-common.patch";
      url = "https://github.com/jimevins/glabels/commit/f64e3f34e3631330fff2fb48ab271ff9c6160229.patch";
      sha256 = "13q6g4bxzvzwjnvzkvijds2b6yvc4xqbdwgqnwmj65ln6ngxz8sa";
    })
  ];

  nativeBuildInputs = [ autoreconfHook pkg-config makeWrapper intltool ];
  buildInputs = [
    barcode gtk3 gtk-doc yelp-tools
    gnome.gnome-common gsettings-desktop-schemas
    itstool libxml2 librsvg libe-book libtool
  ];

  preFixup = ''
    wrapProgram "$out/bin/glabels-3" \
      --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH"
  '';

  passthru = {
    updateScript = gnome.updateScript {
      packageName = pname;
      versionPolicy = "none";
    };
  };

{'fraction_non_alphanumeric': 0.12593828190158465, 'fraction_numerical': 0.042535446205170975, 'mean_word_length': 3.694716242661448, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '4255584', 'n_tokens_mistral': 995, 'n_tokens_neox': 917, 'n_words': 152}