<commit_before>{ stdenv, fetchurl, fetchpatch, pkgconfig, libiconv, libintlOrEmpty
, expat, zlib, libpng, pixman, fontconfig, freetype, xorg
, gobjectSupport ? true, glib
, xcbSupport ? true # no longer experimental since 1.12
, glSupport ? true, mesa_noglu ? null # mesa is no longer a big dependency
, pdfSupport ? true
}:

assert glSupport -> mesa_noglu != null;

with { inherit (stdenv.lib) optional optionals; };

stdenv.mkDerivation rec {
  name = "cairo-1.14.2";

  src = fetchurl {
    url = "http://cairographics.org/releases/${name}.tar.xz";
    sha1 = "c8da68aa66ca0855b5d0ff552766d3e8679e1d24";
  };

  nativeBuildInputs = [ pkgconfig libiconv ] ++ libintlOrEmpty;

  propagatedBuildInputs =
    with xorg; [ xorg.xlibsWrapper fontconfig expat freetype pixman zlib libpng ]
    ++ optional (!stdenv.isDarwin) libXrender
    ++ optionals xcbSupport [ libxcb xcbutil ]
    ++ optional gobjectSupport glib
    ++ optionals glSupport [ mesa_noglu ]
    ;

  configureFlags = [ "--enable-tee" ]
    ++ optional xcbSupport "--enable-xcb"
    ++ optional glSupport "--enable-gl"
    ++ optional pdfSupport "--enable-pdf"
    ;<commit_msg>cairo: maintenance update 1.14.2 -> 1.14.4 (close #10778)<commit_after>{ stdenv, fetchurl, fetchpatch, pkgconfig, libiconv, libintlOrEmpty
, expat, zlib, libpng, pixman, fontconfig, freetype, xorg
, gobjectSupport ? true, glib
, xcbSupport ? true # no longer experimental since 1.12
, glSupport ? true, mesa_noglu ? null # mesa is no longer a big dependency
, pdfSupport ? true
}:

assert glSupport -> mesa_noglu != null;

with { inherit (stdenv.lib) optional optionals; };

stdenv.mkDerivation rec {
  name = "cairo-1.14.4";

  src = fetchurl {
    url = "http://cairographics.org/releases/${name}.tar.xz";
    sha256 = "05p75r914d809711yg9rapgmmi4hymzbarhd3w0yrfadhiy9rv7n";
  };

  nativeBuildInputs = [ pkgconfig libiconv ] ++ libintlOrEmpty;

  propagatedBuildInputs =
    with xorg; [ xorg.xlibsWrapper fontconfig expat freetype pixman zlib libpng ]
    ++ optional (!stdenv.isDarwin) libXrender
    ++ optionals xcbSupport [ libxcb xcbutil ]
    ++ optional gobjectSupport glib
    ++ optionals glSupport [ mesa_noglu ]
    ;

  configureFlags = [ "--enable-tee" ]
    ++ optional xcbSupport "--enable-xcb"
    ++ optional glSupport "--enable-gl"
    ++ optional pdfSupport "--enable-pdf"
    ;
{'fraction_non_alphanumeric': 0.11860068259385666, 'fraction_numerical': 0.03199658703071672, 'mean_word_length': 3.8550724637681157, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, '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': '1450111', 'n_tokens_mistral': 871, 'n_tokens_neox': 827, 'n_words': 194}