<commit_before>{ stdenv, lib, fetchurl, fetchsvn, fetchFromGitHub,
  jansson, libedit, libxml2, libxslt, ncurses, openssl, sqlite,
  util-linux, dmidecode, libuuid, newt,
  lua, speex, libopus, opusfile, libogg,
  srtp, wget, curl, iksemel, pkg-config,
  autoconf, libtool, automake, fetchpatch,
  python39, writeScript,
  withOpus ? true,
}:

let
  # remove when upgrading to pjsip >1.12.1
  pjsip_patches = [
    (fetchpatch {
      name = "0150-CVE-2022-31031.patch";
      url = "https://github.com/pjsip/pjproject/commit/450baca94f475345542c6953832650c390889202.patch";
      sha256 = "sha256-30kHrmB51UIw4x/J6/CD+vPKf/gBYDCcFoUpwEWkDMY=";
    })
    (fetchpatch {
      name = "0151-CVE-2022-39244.patch";
      url = "https://github.com/pjsip/pjproject/commit/c4d34984ec92b3d5252a7d5cddd85a1d3a8001ae.patch";
      sha256 = "sha256-hTUMh6bYAizn6GF+sRV1vjKVxSf9pnI+eQdPOqsdJI4=";
    })
    (fetchpatch {
      name = "0152-CVE-2022-39269.patch";
      url = "https://github.com/pjsip/pjproject/commit/d2acb9af4e27b5ba75d658690406cec9c274c5cc.patch";
      sha256 = "sha256-bKE/MrRAqN1FqD2ubhxIOOf5MgvZluHHeVXPjbR12iQ=";
    })
  ];
  common = {version, sha256, externals}: stdenv.mkDerivation {
    inherit version;
    pname = "asterisk";

    buildInputs = [ jansson libedit libxml2 libxslt ncurses openssl sqlite
                    dmidecode libuuid newt<commit_msg>asterisk: fix comment about version<commit_after>{ stdenv, lib, fetchurl, fetchsvn, fetchFromGitHub,
  jansson, libedit, libxml2, libxslt, ncurses, openssl, sqlite,
  util-linux, dmidecode, libuuid, newt,
  lua, speex, libopus, opusfile, libogg,
  srtp, wget, curl, iksemel, pkg-config,
  autoconf, libtool, automake, fetchpatch,
  python39, writeScript,
  withOpus ? true,
}:

let
  # remove when upgrading to pjsip >2.12.1
  pjsip_patches = [
    (fetchpatch {
      name = "0150-CVE-2022-31031.patch";
      url = "https://github.com/pjsip/pjproject/commit/450baca94f475345542c6953832650c390889202.patch";
      sha256 = "sha256-30kHrmB51UIw4x/J6/CD+vPKf/gBYDCcFoUpwEWkDMY=";
    })
    (fetchpatch {
      name = "0151-CVE-2022-39244.patch";
      url = "https://github.com/pjsip/pjproject/commit/c4d34984ec92b3d5252a7d5cddd85a1d3a8001ae.patch";
      sha256 = "sha256-hTUMh6bYAizn6GF+sRV1vjKVxSf9pnI+eQdPOqsdJI4=";
    })
    (fetchpatch {
      name = "0152-CVE-2022-39269.patch";
      url = "https://github.com/pjsip/pjproject/commit/d2acb9af4e27b5ba75d658690406cec9c274c5cc.patch";
      sha256 = "sha256-bKE/MrRAqN1FqD2ubhxIOOf5MgvZluHHeVXPjbR12iQ=";
    })
  ];
  common = {version, sha256, externals}: stdenv.mkDerivation {
    inherit version;
    pname = "asterisk";

    buildInputs = [ jansson libedit libxml2 libxslt ncurses openssl sqlite
                    dmidecode libuuid newt
{'fraction_non_alphanumeric': 0.11923631123919308, 'fraction_numerical': 0.11671469740634005, 'mean_word_length': 3.7308347529812607, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 6, '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': '1344437', 'n_tokens_mistral': 1393, 'n_tokens_neox': 1196, 'n_words': 171}