<commit_before>{ fetchurl, stdenv, xz, pkgconfig, gtk, pango, perl, python, ply, zip, libIDL
, libjpeg, libpng, zlib, cairo, dbus, dbus_glib, bzip2, xlibs, alsaLib
, libnotify, gnomevfs, libgnomeui
, freetype, fontconfig, wirelesstools ? null, pixman
, application ? "browser" }:

# Build the WiFi stuff on Linux-based systems.
# FIXME: Disable for now until it can actually be built:
# http://thread.gmane.org/gmane.comp.gnu.gnuzilla/1376 .
#assert stdenv.isLinux -> (wirelesstools != null);

let version = "4.0"; in
stdenv.mkDerivation {
  name = "icecat-${version}";

  src = fetchurl {
    url = "mirror://gnu/gnuzilla/${version}/icecat-${version}.tar.xz";
    sha256 = "0ss2z7nrx3v3yhrd20f7gjkj8yba5xkd72l5jvq9qpwb1r08k2fh";
  };

  buildInputs =
    [ xz libgnomeui libnotify gnomevfs alsaLib
      pkgconfig gtk perl zip libIDL libjpeg libpng zlib cairo bzip2 pixman
      python ply dbus dbus_glib pango freetype fontconfig
      xlibs.libXi xlibs.libX11 xlibs.libXrender xlibs.libXft xlibs.libXt
    ]
    ++ (stdenv.lib.optional false /* stdenv.isLinux */ wirelesstools);

  patches = [
    ./skip-gre-registration.patch ./rpath-link.patch
  ];

  configureFlags =
    [ "--enable-application=${application}"
      "--enable-libxul"<commit_msg>GNU IceCat 4.0.1.1.<commit_after>{ fetchurl, stdenv, xz, pkgconfig, gtk, pango, perl, python, ply, zip, libIDL
, libjpeg, libpng, zlib, cairo, dbus, dbus_glib, bzip2, xlibs, alsaLib
, libnotify, gnomevfs, libgnomeui
, freetype, fontconfig, wirelesstools ? null, pixman
, application ? "browser" }:

# Build the WiFi stuff on Linux-based systems.
# FIXME: Disable for now until it can actually be built:
# http://thread.gmane.org/gmane.comp.gnu.gnuzilla/1376 .
#assert stdenv.isLinux -> (wirelesstools != null);

let version = "4.0.1.1"; in
stdenv.mkDerivation {
  name = "icecat-${version}";

  src = fetchurl {
    url = "mirror://gnu/gnuzilla/${version}/icecat-${version}.tar.xz";
    sha256 = "1f1y1834pv8f5fmfb5d4d5gj2v7bxsk3k9b9g832bwq0h5203yvg";
  };

  buildInputs =
    [ xz libgnomeui libnotify gnomevfs alsaLib
      pkgconfig gtk perl zip libIDL libjpeg libpng zlib cairo bzip2 pixman
      python ply dbus dbus_glib pango freetype fontconfig
      xlibs.libXi xlibs.libX11 xlibs.libXrender xlibs.libXft xlibs.libXt
    ]
    ++ (stdenv.lib.optional false /* stdenv.isLinux */ wirelesstools);

  patches = [
    ./skip-gre-registration.patch ./rpath-link.patch
  ];

  configureFlags =
    [ "--enable-application=${application}"
      "--enable-libxul"
{'fraction_non_alphanumeric': 0.1254964257347101, 'fraction_numerical': 0.02938840349483717, 'mean_word_length': 3.798095238095238, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '5933796', 'n_tokens_mistral': 1042, 'n_tokens_neox': 959, 'n_words': 211}