<commit_before>{ stdenv
, autoconf
, automake
, fetchurl
, fetchpatch
, gettext
, gnulib
, gnum4
, lib
, libtool
, perl

, freetype
, giflib
, glib
, libjpeg
, libpng
, libtiff
, libxml2
, readline
, uthash
, zlib
}:

let
  version = "20170731";
in
stdenv.mkDerivation rec {
  name = "fontforge-${version}";

  src = fetchurl {
    url = "https://github.com/fontforge/fontforge/archive/${version}.tar.gz";
    sha256 = "3f53d06caba2a96dc498df81717e35504815046b3178e811c85c4cc135492d8c";
  };

  patches = [
    (fetchpatch {
      name = "use-system-uthash.patch";
      url = "http://pkgs.fedoraproject.org/cgit/fontforge.git/plain/"
        + "fontforge-20140813-use-system-uthash.patch?id=8bdf933";
      multihash = "QmcmrPTJafenDXyxb27fUwp4z9gQuwUFUyDQyH7xRmYiLP";
      sha256 = "0n8i62qv2ygfii535rzp09vvjx4qf9zp5qq7qirrbzm1l9gykcjy";
    })
  ];

  patchFlags = "-p0";

  nativeBuildInputs = [
    autoconf
    automake
    gettext
    gnum4
    libtool
    perl
  ];

  buildInputs = [
    freetype
    giflib
    glib
    libjpeg
    libpng
    libtiff
    libxml2
    readline
    uthash
    zlib
  ];

  preConfigure = ''
    sed -i '/func_check_versions ()/{N;s/{/{ return 0/}' bootstrap

    unpackFile "${gnulib.src}"
    mv gnulib* gnulib

    ./bootstrap --skip-git --gnulib-srcdir=./gnulib
  '';

  configureFlags = [
    "--disable-python-extension"
    "--disable-python-scripting"
  ];

  meta = with lib; {
    description = "A font editor";
    homepage = http://fontforge.github.io;
    maintainers = with maintainers; [
      wkennington
    ];
    platforms = with platforms;
      x86_64-linux;
  };
}

<commit_msg>fontforge: fix fetchurl -> fetchzip<commit_after>{ stdenv
, autoconf
, automake
, fetchzip
, fetchpatch
, gettext
, gnulib
, gnum4
, lib
, libtool
, perl

, freetype
, giflib
, glib
, libjpeg
, libpng
, libtiff
, libxml2
, readline
, uthash
, zlib
}:

let
  version = "20170731";
in
stdenv.mkDerivation rec {
  name = "fontforge-${version}";

  src = fetchzip {
    version = 3;
    url = "https://github.com/fontforge/fontforge/archive/${version}.tar.gz";
    sha256 = "4e854db895ae1386a12a60af224d072664e3dc7b5d75145edc39566302730332";
  };

  patches = [
    (fetchpatch {
      name = "use-system-uthash.patch";
      url = "http://pkgs.fedoraproject.org/cgit/fontforge.git/plain/"
        + "fontforge-20140813-use-system-uthash.patch?id=8bdf933";
      multihash = "QmcmrPTJafenDXyxb27fUwp4z9gQuwUFUyDQyH7xRmYiLP";
      sha256 = "0n8i62qv2ygfii535rzp09vvjx4qf9zp5qq7qirrbzm1l9gykcjy";
    })
  ];

  patchFlags = "-p0";

  nativeBuildInputs = [
    autoconf
    automake
    gettext
    gnum4
    libtool
    perl
  ];

  buildInputs = [
    freetype
    giflib
    glib
    libjpeg
    libpng
    libtiff
    libxml2
    readline
    uthash
    zlib
  ];

  preConfigure = ''
    sed -i '/func_check_versions ()/{N;s/{/{ return 0/}' bootstrap

    unpackFile "${gnulib.src}"
    mv gnulib* gnulib

    ./bootstrap --skip-git --gnulib-srcdir=./gnulib
  '';

  configureFlags = [
    "--disable-python-extension"
    "--disable-python-scripting"
  ];

  meta = with lib; {
    description = "A font editor";
    homepage = http://fontforge.github.io;
    maintainers = with maintainers; [
      wkennington
    ];
    platforms = with platforms;
      x86_64-linux;
  };
}


{'fraction_non_alphanumeric': 0.12556458897922312, 'fraction_numerical': 0.06172839506172839, 'mean_word_length': 2.728395061728395, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 2, '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': '6872097', 'n_tokens_mistral': 1489, 'n_tokens_neox': 1348, 'n_words': 211}