<commit_before>{ stdenv
, fetchTritonPatch
, fetchurl
, lib
, nasm

, libsndfile
}:

let
  inherit (stdenv)
    targetSystem;
  inherit (lib)
    boolEn
    boolString
    elem
    optional
    platforms;

  sndfileFileIO =
    if libsndfile != null then
      "sndfile"
    else
      "lame";

  channel = "3.99";
  version = "${channel}.5";
in
stdenv.mkDerivation rec {
  name = "lame-${version}";

  src = fetchurl {
    url = "mirror://sourceforge/lame/lame/${channel}/${name}.tar.gz";
    sha256 = "24346b4158e4af3bd9f2e194bb23eb473c75fb7377011523353196b19b9a23ff";
  };

  patches = [
    (fetchTritonPatch {
      rev = "b29eb4e2cc5185e9dd8bc670bc48797cf8dce10e";
      file = "l/lame/CVE-2017-15018.patch";
      sha256 = "de7467b0edc241bb739f267d054be75fdaf9af6e0360556c948a8b40b469ca6e";
    })
    (fetchTritonPatch {
      rev = "7b4e03ea2c1aa248c38b4f55ed4892bfceaf4d32";
      file = "lame/lame-gcc-4.9.patch";
      sha256 = "9f675fa1a5ef15111bb51253b31fc88dbf9b21a5111e38ac0060b97abe42b39f";
    })
  ];

  nativeBuildInputs = [
    nasm
  ];

  buildInputs = [ ]
    ++ optional (libsndfile != null) libsndfile;

  configureFlags = [
    "--disable-maintainer-mode"
    "--enable-largefile"
    "--${boolEn (elem targetSystem platforms.x86-all)}-nasm"
    "--enable-rpath"
    "--enable-cpml"
    "--disable-gtktest"<commit_msg>lame: 3.99.5 -> 3.100<commit_after>{ stdenv
, fetchurl
, lib
, nasm

, libsndfile
, ncurses
}:

let
  inherit (stdenv)
    targetSystem;
  inherit (lib)
    boolEn
    boolString
    elem
    optional
    platforms;

  sndfileFileIO =
    if libsndfile != null then
      "sndfile"
    else
      "lame";

  channel = "3.100";
  version = "${channel}";
in
stdenv.mkDerivation rec {
  name = "lame-${version}";

  src = fetchurl {
    url = "mirror://sourceforge/lame/lame/${channel}/${name}.tar.gz";
    sha256 = "ddfe36cab873794038ae2c1210557ad34857a4b6bdc515785d1da9e175b1da1e";
  };

  nativeBuildInputs = [
    nasm
  ];

  buildInputs = [
    ncurses
  ] ++ optional (libsndfile != null) libsndfile;

  configureFlags = [
    "--disable-maintainer-mode"
    "--enable-largefile"
    "--${boolEn (elem targetSystem platforms.x86-all)}-nasm"
    "--enable-rpath"
    "--enable-cpml"
    "--disable-gtktest"
{'fraction_non_alphanumeric': 0.1370896184560781, 'fraction_numerical': 0.10869565217391304, 'mean_word_length': 2.949211908931699, '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': '4100979', 'n_tokens_mistral': 1047, 'n_tokens_neox': 910, 'n_words': 133}