<commit_before>{ stdenv, fetchpatch, fetchgit, autoconf, automake, gettext, libtool, readline, utillinux }:

let
  gentooPatch = name: sha256: fetchpatch {
    url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/sys-fs/xfsprogs/files/${name}?id=f4055adc94e11d182033a71e32f97b357c034aff";
    inherit sha256;
  };
in

stdenv.mkDerivation rec {
  name = "xfsprogs-${version}";
  version = "4.14.0";

  src = fetchgit {
    url = "git://git.kernel.org/pub/scm/fs/xfs/xfsprogs-dev.git";
    rev = "refs/tags/v${version}";
    sha256 = "19mg3avm188xz215hqbbh7251q27qwm7g1xr8ffrjwvzmdq55rxj";
  };

  outputs = [ "bin" "dev" "out" "doc" ];

  nativeBuildInputs = [ autoconf automake libtool gettext ];
  propagatedBuildInputs = [ utillinux ]; # Dev headers include <uuid/uuid.h>
  buildInputs = [ readline ];

  enableParallelBuilding = true;

  # Why is all this garbage needed? Why? Why?
  patches = [
    (gentooPatch "xfsprogs-4.12.0-sharedlibs.patch" "1i081749x91jvlrw84l4a3r081vqcvn6myqhnqbnfcfhd64h12bq")
    (gentooPatch "xfsprogs-4.7.0-libxcmd-link.patch" "1lvy1ajzml39a631a7jqficnzsd40bzkca7hkxv1ybiqyp8sf55s")
    (gentooPatch "xfsprogs-4.9.0-underlinking.patch" "1r7l8jphspy14i43zbfnjrnyrdm4cpgyfchblascxylmans0gci7")
    ./glibc-2.27.patch
  ];

  preConfigure = ''
    sed -i Makefile -e '/cp include.install-sh/d'
    make configure
  '';

  configureFlags = [
    "--disable-lib64"
    "--enable-readline"
  ];

  installFlags = [ "install-dev" ];
<commit_msg>xfsprogs: swap src url to HTTPS<commit_after>{ stdenv, fetchpatch, fetchgit, autoconf, automake, gettext, libtool, readline, utillinux }:

let
  gentooPatch = name: sha256: fetchpatch {
    url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/sys-fs/xfsprogs/files/${name}?id=f4055adc94e11d182033a71e32f97b357c034aff";
    inherit sha256;
  };
in

stdenv.mkDerivation rec {
  name = "xfsprogs-${version}";
  version = "4.14.0";

  src = fetchgit {
    url = "https://git.kernel.org/pub/scm/fs/xfs/xfsprogs-dev.git";
    rev = "v${version}";
    sha256 = "19mg3avm188xz215hqbbh7251q27qwm7g1xr8ffrjwvzmdq55rxj";
  };

  outputs = [ "bin" "dev" "out" "doc" ];

  nativeBuildInputs = [ autoconf automake libtool gettext ];
  propagatedBuildInputs = [ utillinux ]; # Dev headers include <uuid/uuid.h>
  buildInputs = [ readline ];

  enableParallelBuilding = true;

  # Why is all this garbage needed? Why? Why?
  patches = [
    (gentooPatch "xfsprogs-4.12.0-sharedlibs.patch" "1i081749x91jvlrw84l4a3r081vqcvn6myqhnqbnfcfhd64h12bq")
    (gentooPatch "xfsprogs-4.7.0-libxcmd-link.patch" "1lvy1ajzml39a631a7jqficnzsd40bzkca7hkxv1ybiqyp8sf55s")
    (gentooPatch "xfsprogs-4.9.0-underlinking.patch" "1r7l8jphspy14i43zbfnjrnyrdm4cpgyfchblascxylmans0gci7")
    ./glibc-2.27.patch
  ];

  preConfigure = ''
    sed -i Makefile -e '/cp include.install-sh/d'
    make configure
  '';

  configureFlags = [
    "--disable-lib64"
    "--enable-readline"
  ];

  installFlags = [ "install-dev" ];

{'fraction_non_alphanumeric': 0.13903924221921515, 'fraction_numerical': 0.08119079837618404, 'mean_word_length': 3.9949324324324325, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 3, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '242159', 'n_tokens_mistral': 1392, 'n_tokens_neox': 1270, 'n_words': 179}