<commit_before>{ fetchurl, stdenv, openssl, db48, boost, zlib, miniupnpc, qt4, utillinux
, pkgconfig, protobuf, qrencode, gui ? true }:

with stdenv.lib;

stdenv.mkDerivation rec {
  version = "0.9.3";
  name = "bitcoin${toString (optional (!gui) "d")}-${version}";

  src = fetchurl {
    url = "https://bitcoin.org/bin/${version}/bitcoin-${version}-linux.tar.gz";
    sha256 = "1kb59w7232qzfh952rz6vvjri2w26n9cq7baml0vifdsdhxph9f4";
  };

  # hexdump from utillinux is required for tests
  buildInputs = [
    openssl db48 boost zlib miniupnpc utillinux pkgconfig protobuf 
  ] ++ optionals gui [ qt4 qrencode ];

  unpackPhase = ''
    mkdir tmp-extract && (cd tmp-extract && tar xf $src)
    tar xf tmp-extract/bitcoin*/src/bitcoin*.tar*
    cd bitcoin*
  '';

  preCheck = ''
    # At least one test requires writing in $HOME
    HOME=$TMPDIR
  '';

  doCheck = true;

  enableParallelBuilding = true;

  passthru.walletName = "bitcoin";

  meta = {
      description = "Peer-to-peer electronic cash system";
      longDescription= ''
        Bitcoin is a free open source peer-to-peer electronic cash system that is
        completely decentralized, without the need for a central server or trusted
        parties.  Users hold the crypto keys to their own money and transact directly
        with each other, with the help of a P2P network to check for double-spending.
      '';
      homepage = "http://www.bitcoin.org/";
      maintainers = [ maintainers.roconnor ];
      license = licenses.mit;
  };
}<commit_msg>bitcoin(d): fix builing on hydra and with boost 1.56<commit_after>{ fetchurl, stdenv, openssl, db48, boost, zlib, miniupnpc, qt4, utillinux
, pkgconfig, protobuf, qrencode, gui ? true }:

with stdenv.lib;

stdenv.mkDerivation rec {
  version = "0.9.3";
  name = "bitcoin${toString (optional (!gui) "d")}-${version}";

  src = fetchurl {
    url = "https://bitcoin.org/bin/${version}/bitcoin-${version}-linux.tar.gz";
    sha256 = "1kb59w7232qzfh952rz6vvjri2w26n9cq7baml0vifdsdhxph9f4";
  };

  # hexdump from utillinux is required for tests
  buildInputs = [
    openssl db48 boost zlib miniupnpc utillinux pkgconfig protobuf 
  ] ++ optionals gui [ qt4 qrencode ];

  unpackPhase = ''
    mkdir tmp-extract && (cd tmp-extract && tar xf $src)
    tar xf tmp-extract/bitcoin*/src/bitcoin*.tar*
    cd bitcoin*
  '';

  preCheck = ''
    # At least one test requires writing in $HOME
    HOME=$TMPDIR
  '';

  configureFlags = [ "--with-boost-libdir=${boost.lib}/lib" ];

  doCheck = true;

  enableParallelBuilding = true;

  passthru.walletName = "bitcoin";

  meta = {
      description = "Peer-to-peer electronic cash system";
      longDescription= ''
        Bitcoin is a free open source peer-to-peer electronic cash system that is
        completely decentralized, without the need for a central server or trusted
        parties.  Users hold the crypto keys to their own money and transact directly
        with each other, with the help of a P2P network to check for double-spending.
      '';
      homepage = "http://www.bitcoin.org/";
      maintainers = [ maintainers.roconnor ];
      license = licenses.mit;
      platforms = platforms.unix;
  };
}
{'fraction_non_alphanumeric': 0.11390021964229684, 'fraction_numerical': 0.021022905553812362, 'mean_word_length': 3.161879895561358, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, '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': '6975527', 'n_tokens_mistral': 1106, 'n_tokens_neox': 1055, 'n_words': 300}