<commit_before>{ stdenv, fetchurl, getopt, bash }:

stdenv.mkDerivation rec {
  name    = "libseccomp-${version}";
  version = "2.1.1";

  src = fetchurl {
    url    = "mirror://sourceforge/libseccomp/libseccomp-${version}.tar.gz";
    sha256 = "0744mjx5m3jl1hzz13zypivl88m0wn44mf5gsrd3yf3w80gc24l8";
  };

  # This fixes the check for 'getopt' to function appropriately.
  # Additionally, this package can optionally include the kernel
  # headers if they exist, or use its own inline copy of the source
  # for talking to the seccomp filter - we opt to always use the
  # inline copy
  patchPhase = ''
    substituteInPlace ./configure --replace "/bin/bash" "${bash}/bin/bash"
    substituteInPlace ./configure --replace "verify_deps getopt" ""
    substituteInPlace ./configure --replace getopt ${getopt}/bin/getopt
    substituteInPlace ./configure --replace 'opt_sysinc_seccomp="yes"' 'opt_sysinc_seccomp="no"'
  '';

  meta = {
    description = "high level library for the Linux Kernel seccomp filter";
    homepage    = "http://sourceforge.net/projects/libseccomp";
    license     = stdenv.lib.licenses.lgpl2;
    platforms   = stdenv.lib.platforms.linux;
    maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
  };
}<commit_msg>libseccomp: 2.1.1 -> 2.2.0<commit_after>{ stdenv, fetchFromGitHub, autoreconfHook, getopt }:

stdenv.mkDerivation rec {
  name    = "libseccomp-${version}";
  version = "2.2.0";

  src = fetchFromGitHub {
    owner = "seccomp";
    repo = "libseccomp";
    rev = "v${version}";
    sha256 = "0vfd6hx92cp1jaqxxaj30r92bfm6fmamxi2yqxrl82mqism1lk84";
  };

  buildInputs = [ autoreconfHook getopt ];

  patchPhase = ''
    patchShebangs .
  '';

  meta = with stdenv.lib; {
    description = "high level library for the Linux Kernel seccomp filter";
    homepage    = "http://sourceforge.net/projects/libseccomp";
    license     = licenses.lgpl2;
    platforms   = platforms.linux;
    maintainers = with maintainers; [ thoughtpolice wkennington ];
  };
}
{'fraction_non_alphanumeric': 0.12274549098196393, 'fraction_numerical': 0.02905811623246493, 'mean_word_length': 3.507900677200903, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, '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': '5101079', 'n_tokens_mistral': 737, 'n_tokens_neox': 694, 'n_words': 153}