<commit_before>{ stdenv, lib, fetchurl, fetchgit, bison, glibc, bash, coreutils, makeWrapper, tzdata, iana_etc, perl, Security }:

let
  loader386 = "${glibc}/lib/ld-linux.so.2";
  loaderAmd64 = "${glibc}/lib/ld-linux-x86-64.so.2";
  loaderArm = "${glibc}/lib/ld-linux.so.3";
  srcs = {
    golang = fetchurl {
      url = https://github.com/golang/go/archive/go1.4.1.tar.gz;
      sha256 = "1q21i08nymy30vszbcah8l8yjxm32x2wmjs44kn2x2r4556y1mgi";
    };
    tools = fetchgit {
      url = https://github.com/golang/tools.git;
      rev = "c836fe615a448dbf9ff5448c1aa657479a0d0aeb";
      sha256 = "0q9jnhmgmm3xzjss7ndsi6nyykmmb1y984n98118c2sipi183xp5";
    };
  };
in

stdenv.mkDerivation {
  name = "go-1.4.1";

  src = srcs.golang;

  # perl is used for testing go vet
  buildInputs = [ bison bash makeWrapper perl ]
             ++ lib.optionals stdenv.isLinux [ glibc ]
             ++ lib.optionals stdenv.isDarwin [ Security ];

  # I'm not sure what go wants from its 'src', but the go installation manual<commit_msg>go: Update to version 1.4.2<commit_after>{ stdenv, lib, fetchurl, fetchgit, bison, glibc, bash, coreutils, makeWrapper, tzdata, iana_etc, perl, Security }:

let
  loader386 = "${glibc}/lib/ld-linux.so.2";
  loaderAmd64 = "${glibc}/lib/ld-linux-x86-64.so.2";
  loaderArm = "${glibc}/lib/ld-linux.so.3";
  srcs = {
    golang = fetchurl {
      url = https://github.com/golang/go/archive/go1.4.2.tar.gz;
      sha256 = "3e5d07bc5214a1ffe187cf6406c5b5a80ee44f12f6bca97a5463db0afee2f6ac";
    };
    tools = fetchgit {
      url = https://github.com/golang/tools.git;
      rev = "c836fe615a448dbf9ff5448c1aa657479a0d0aeb";
      sha256 = "0q9jnhmgmm3xzjss7ndsi6nyykmmb1y984n98118c2sipi183xp5";
    };
  };
in

stdenv.mkDerivation {
  name = "go-1.4.2";

  src = srcs.golang;

  # perl is used for testing go vet
  buildInputs = [ bison bash makeWrapper perl ]
             ++ lib.optionals stdenv.isLinux [ glibc ]
             ++ lib.optionals stdenv.isDarwin [ Security ];

  # I'm not sure what go wants from its 'src', but the go installation manual
{'fraction_non_alphanumeric': 0.13355834136933462, 'fraction_numerical': 0.09161041465766634, 'mean_word_length': 3.1750503018108653, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, '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': '6328934', 'n_tokens_mistral': 963, 'n_tokens_neox': 857, 'n_words': 151}