<commit_before>{ stdenv, fetchurl, m4, cxx ? true }:

stdenv.mkDerivation rec {
  name = "gmp-5.0.5";

  src = fetchurl {
    url = "mirror://gnu/gmp/${name}.tar.bz2";
    sha256 = "1jfymbr90mpn0zw5sg001llqnvf2462y77vgjknrmfs1rjn8ln0z";
  };

  patches = [ ./ignore-bad-cpuid.patch ];

  buildNativeInputs = [ m4 ];

  configureFlags =
    # Build a "fat binary", with routines for several sub-architectures (x86).
    [ "--enable-fat" ]
    ++ (if cxx then [ "--enable-cxx" ] else [ "--disable-cxx" ]);

  doCheck = true;

  enableParallelBuilding = true;

  meta = {
    description = "GMP, the GNU multiple precision arithmetic library";

    longDescription =
      '' GMP is a free library for arbitrary precision arithmetic, operating<commit_msg>gmp: don't build fat binaries on Solaris<commit_after>{ stdenv, fetchurl, m4, cxx ? true }:

stdenv.mkDerivation rec {
  name = "gmp-5.0.5";

  src = fetchurl {
    url = "mirror://gnu/gmp/${name}.tar.bz2";
    sha256 = "1jfymbr90mpn0zw5sg001llqnvf2462y77vgjknrmfs1rjn8ln0z";
  };

  patches = [ ./ignore-bad-cpuid.patch ];

  buildNativeInputs = [ m4 ];

  configureFlags =
    # Build a "fat binary", with routines for several sub-architectures
    # (x86), except on Solaris where some tests crash with "Memory fault".
    # See <http://hydra.nixos.org/build/2760931>, for instance.
    (stdenv.lib.optional (!stdenv.isSunOS) "--enable-fat")
    ++ (if cxx then [ "--enable-cxx" ] else [ "--disable-cxx" ]);

  doCheck = true;

  enableParallelBuilding = true;

  meta = {
    description = "GMP, the GNU multiple precision arithmetic library";

    longDescription =
      '' GMP is a free library for arbitrary precision arithmetic, operating
{'fraction_non_alphanumeric': 0.13655091230135374, 'fraction_numerical': 0.03708063566804003, 'mean_word_length': 3.2606516290726817, 'pattern_counts': {'":': 0, '<': 4, '<?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': '963237', 'n_tokens_mistral': 654, 'n_tokens_neox': 593, 'n_words': 145}