<commit_before>{ stdenv, fetchurl
, attr, judy, keyutils, libaio, libapparmor, libbsd, libcap, libgcrypt, lksctp-tools, zlib
}:

stdenv.mkDerivation rec {
  pname = "stress-ng";
  version = "0.11.02";

  src = fetchurl {
    url = "https://kernel.ubuntu.com/~cking/tarballs/${pname}/${pname}-${version}.tar.xz";
    sha256 = "0vwqv3hq7h4z53ayk2c69zf60ncr0v2g0vxaci1pmxlhiz56y6md";
  };

  postPatch = ''
    sed -i '/\#include <bsd\/string.h>/i #undef HAVE_STRLCAT\n#undef HAVE_STRLCPY' stress-ng.h
  ''; # needed because of Darwin patch on libbsd

  # All platforms inputs then Linux-only ones
  buildInputs = [ judy libbsd libgcrypt zlib ]
    ++ stdenv.lib.optionals stdenv.hostPlatform.isLinux [
      attr keyutils libaio libapparmor libcap lksctp-tools
    ];

  makeFlags = [
    "BINDIR=${placeholder "out"}/bin"
    "MANDIR=${placeholder "out"}/share/man/man1"
    "JOBDIR=${placeholder "out"}/share/stress-ng/example-jobs"
    "BASHDIR=${placeholder "out"}/share/bash-completion/completions"
  ];

  NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.hostPlatform.isMusl "-D_LINUX_SYSINFO_H=1";

  # Won't build on i686 because the binary will be linked again in the<commit_msg>stress-ng: 0.11.02 -> 0.11.07<commit_after>{ stdenv, fetchurl
, attr, judy, keyutils, libaio, libapparmor, libbsd, libcap, libgcrypt, lksctp-tools, zlib
}:

stdenv.mkDerivation rec {
  pname = "stress-ng";
  version = "0.11.07";

  src = fetchurl {
    url = "https://kernel.ubuntu.com/~cking/tarballs/${pname}/${pname}-${version}.tar.xz";
    sha256 = "1kyxkwn18y4161yyvxw3hd9xlzwlp270sn4gpnzvmr6rwxhr0nvh";
  };

  postPatch = ''
    sed -i '/\#include <bsd\/string.h>/i #undef HAVE_STRLCAT\n#undef HAVE_STRLCPY' stress-ng.h
  ''; # needed because of Darwin patch on libbsd

  # All platforms inputs then Linux-only ones
  buildInputs = [ judy libbsd libgcrypt zlib ]
    ++ stdenv.lib.optionals stdenv.hostPlatform.isLinux [
      attr keyutils libaio libapparmor libcap lksctp-tools
    ];

  makeFlags = [
    "BINDIR=${placeholder "out"}/bin"
    "MANDIR=${placeholder "out"}/share/man/man1"
    "JOBDIR=${placeholder "out"}/share/stress-ng/example-jobs"
    "BASHDIR=${placeholder "out"}/share/bash-completion/completions"
  ];

  NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.hostPlatform.isMusl "-D_LINUX_SYSINFO_H=1";

  # Won't build on i686 because the binary will be linked again in the
{'fraction_non_alphanumeric': 0.1409507923269391, 'fraction_numerical': 0.028773978315262717, 'mean_word_length': 4.018828451882845, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, 'https://': 2, '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': '236884', 'n_tokens_mistral': 980, 'n_tokens_neox': 914, 'n_words': 173}