<commit_before>/* This file defines the composition for Go packages. */

{ overrides, stdenv, go, buildGoPackage, git, pkgconfig, libusb
, fetchgit, fetchhg, fetchurl, fetchFromGitHub, fetchbzr, pkgs }:

let
  isGo13 = go.meta.branch == "1.3";
  isGo14 = go.meta.branch == "1.4";
  self = _self // overrides; _self = with self; {

  inherit go buildGoPackage;

  ## OFFICIAL GO PACKAGES

  crypto = buildGoPackage rec {
    rev = "4d48e5fa3d62b5e6e71260571bf76c767198ca02";
    name = "go-crypto-${rev}";
    goPackagePath = "golang.org/x/crypto";
    goPackageAliases = [ "code.google.com/p/go.crypto" ];
    disabled = isGo13;

    src = fetchFromGitHub {
      inherit rev;
      owner  = "golang";
      repo   = "crypto";
      sha256 = "0plvjv56afb02p7l3c2zfwffnhscmc3f0ckj1gls9ay6vj85y7l8";
    };
  };

  glog = buildGoPackage rec {
    rev = "44145f04b68cf362d9c4df2182967c2275eaefed";
    name = "glog-${rev}";
    goPackagePath = "github.com/golang/glog";
    src = fetchFromGitHub {
      inherit rev;
      owner = "golang";
      repo = "glog";
      sha256 = "1k7sf6qmpgm0iw81gx2dwggf9di6lgw0n54mni7862hihwfrb5rq";
    };
  };

  image = buildGoPackage rec {
    rev = "490b1ad139b3";
    name = "go.image-${rev}";
    goPackagePath = "code.google.com/p/go.image";
    src = fetchhg {
      inherit rev;
      url = "https://${goPackagePath}";
      sha256 = "02m6ifwby2fi88njarbbb6dimwg0pd2b6llkgyadh4b9wzp2vy4r";
    };
  };

  net = buildGoPackage rec {
    rev = "e0403b4e005737430c05a57aac078479844f919c";
    name = "net-${stdenv.lib.strings.substring 0 7 rev}";
    goPackagePath = "golang.org/x/net";
    goPackageAliases = [ "code.google.com/p/go.net" ];

    src = fetchFromGitHub {
      inherit rev;
      owner = "golang";
      repo = "net";
      sha256 = "1g7cjzw4g4301a3yqpbk8n1d4s97sfby2aysl275x04g0zh8jxqp";
    };

    propagatedBuildInputs = [ text ];
  };

  oauth2 = buildGoPackage rec {
    rev = "f98d0160877ab4712b906626425ed8b0b320907c";
    name = "oauth2-${stdenv.lib.strings.substring 0 7 rev}";
    goPackagePath = "golang.org/x/oauth2";

    src = fetchFromGitHub {
      inherit rev;
      owner = "golang";
      repo = "oauth2";
      sha256 = "0hi54mm63ha7a75avydj6xm0a4dd2njdzllr9y2si1i1wnijqw2i";
    };

    extraSrcs = [
      { inherit (gcloud-golang) src goPackagePath; }
    ];

    buildInputs = [ net ];
  };


  protobuf = buildGoPackage rec {
    rev = "efd7476481382c195beb33acd8ec2f1527167fb4";
    name = "goprotobuf-${stdenv.lib.strings.substring 0 7 rev}";
    goPackagePath = "github.com/golang/protobuf";
    goPackageAliases = [ "code.google.com/p/goprotobuf" ];

    src = fetchFromGitHub {
      inherit rev;
      owner = "golang";
      repo = "protobuf";
      sha256 = "1wc3m4jpsdmmqdcf2isc9913mmwfyv791c0rd26kpjjwynh5dhdm";
    };

    subPackages = [ "proto" "protoc-gen-go" ];
  };

  text = buildGoPackage rec {
    rev = "c93e7c9fff19fb9139b5ab04ce041833add0134e";
    name = "text-${stdenv.lib.strings.substring 0 7 rev}";
    goPackagePath = "golang.org/x/text";

    src = fetchFromGitHub {
      inherit rev;
      owner = "golang";
      repo = "text";
      sha256 = "1yvmllriqjm0k97vnxycz9q0likvh18a68xbyg1k6ddkvn9sy03y";
    };
  };


  tools = buildGoPackage rec {
    rev = "140fcaadc5860b1a014ec69fdeec807fe3b787e8";
    name = "go.tools-${stdenv.lib.strings.substring 0 7 rev}";
    goPackagePath = "code.google.com/p/go.tools";
    src = fetchhg {
      inherit rev;
      url = "http://code.google.com/p/go.tools";
      sha256 = "1vgz4kxy0p56qh6pfbs2c68156hakgx4cmrci9jbg7lnrdaz4y56";
    };
    subPackages = [ "go/vcs" ];
  };

  ## THIRD PARTY

  ansicolor = buildGoPackage rec {
    rev = "8368d3b31cf6f2c2464c7a91675342c9a0ac6658";
    name = "ansicolor-${stdenv.lib.strings.substring 0 7 rev}";
    goPackagePath = "github.com/shiena/ansicolor";<commit_msg>goPackages: Standardize source of built ins<commit_after>/* This file defines the composition for Go packages. */

{ overrides, stdenv, go, buildGoPackage, git, pkgconfig, libusb
, fetchgit, fetchhg, fetchurl, fetchFromGitHub, fetchbzr, pkgs }:

let
  isGo13 = go.meta.branch == "1.3";
  isGo14 = go.meta.branch == "1.4";
  self = _self // overrides; _self = with self; {

  inherit go buildGoPackage;

  ## OFFICIAL GO PACKAGES

  crypto = buildGoPackage rec {
    rev = "4d48e5fa3d62b5e6e71260571bf76c767198ca02";
    name = "crypto-${stdenv.lib.strings.substring 0 7 rev}";
    goPackagePath = "golang.org/x/crypto";
    goPackageAliases = [ "code.google.com/p/go.crypto" ];
    disabled = isGo13;

    src = fetchFromGitHub {
      inherit rev;
      owner  = "golang";
      repo   = "crypto";
      sha256 = "0plvjv56afb02p7l3c2zfwffnhscmc3f0ckj1gls9ay6vj85y7l8";
    };
  };

  glog = buildGoPackage rec {
    rev = "44145f04b68cf362d9c4df2182967c2275eaefed";
    name = "glog-${stdenv.lib.strings.substring 0 7 rev}";
    goPackagePath = "github.com/golang/glog";

    src = fetchFromGitHub {
      inherit rev;
      owner = "golang";
      repo = "glog";
      sha256 = "1k7sf6qmpgm0iw81gx2dwggf9di6lgw0n54mni7862hihwfrb5rq";
    };
  };

  image = buildGoPackage rec {
    rev = "d8e202c6ce59fad0017414839b6648851d10767e";
    name = "image-${stdenv.lib.strings.substring 0 7 rev}";
    goPackagePath = "golang.org/x/image";

    src = fetchFromGitHub {
      inherit rev;
      owner = "golang";
      repo = "image";
      sha256 = "0cxymm28rgbzsk76d19wm8fwp40dkwxhzmmdjnbkw5541272339l";
    };
  };

  net = buildGoPackage rec {
    rev = "d1d694760b7a3a9fa32e4d1c49e08b2d672221d8";
    name = "net-${stdenv.lib.strings.substring 0 7 rev}";
    goPackagePath = "golang.org/x/net";
    goPackageAliases = [ "code.google.com/p/go.net" ];

    src = fetchFromGitHub {
      inherit rev;
      owner = "golang";
      repo = "net";
      sha256 = "1fk62vjxsyca8hmlpca9rkgy8wqg9zw920d56ib442sjn9ys3zic";
    };

    propagatedBuildInputs = [ text ];
  };

  oauth2 = buildGoPackage rec {
    rev = "f98d0160877ab4712b906626425ed8b0b320907c";
    name = "oauth2-${stdenv.lib.strings.substring 0 7 rev}";
    goPackagePath = "golang.org/x/oauth2";

    src = fetchFromGitHub {
      inherit rev;
      owner = "golang";
      repo = "oauth2";
      sha256 = "0hi54mm63ha7a75avydj6xm0a4dd2njdzllr9y2si1i1wnijqw2i";
    };

    extraSrcs = [
      { inherit (gcloud-golang) src goPackagePath; }
    ];

    buildInputs = [ net ];
  };


  protobuf = buildGoPackage rec {
    rev = "39e27fc0f226450c58e11eda145b542bc5dff3fe";
    name = "protobuf-${stdenv.lib.strings.substring 0 7 rev}";
    goPackagePath = "github.com/golang/protobuf";
    goPackageAliases = [ "code.google.com/p/goprotobuf" ];

    src = fetchFromGitHub {
      inherit rev;
      owner = "golang";
      repo = "protobuf";
      sha256 = "12l036ix0dc8hg35xrqmdcr3bpwncrdkgqkhp3s90w6a3qpva3gs";
    };
  };

  text = buildGoPackage rec {
    rev = "c93e7c9fff19fb9139b5ab04ce041833add0134e";
    name = "text-${stdenv.lib.strings.substring 0 7 rev}";
    goPackagePath = "golang.org/x/text";

    src = fetchFromGitHub {
      inherit rev;
      owner = "golang";
      repo = "text";
      sha256 = "1yvmllriqjm0k97vnxycz9q0likvh18a68xbyg1k6ddkvn9sy03y";
    };
  };


  tools = buildGoPackage rec {
    rev = "7d75e8b219c3efda2d08ae38acd6b42f8da4f5f9";
    name = "tools-${stdenv.lib.strings.substring 0 7 rev}";
    goPackagePath = "golang.org/x/tools";

    src = fetchFromGitHub {
      inherit rev;
      owner = "golang";
      repo = "tools";
      sha256 = "0vq0l3pjhgsp97v6ndlr3jcs029r5zilwai30snwfq74s580sriq";
    };
  };

  ## THIRD PARTY

  ansicolor = buildGoPackage rec {
    rev = "8368d3b31cf6f2c2464c7a91675342c9a0ac6658";
    name = "ansicolor-${stdenv.lib.strings.substring 0 7 rev}";
    goPackagePath = "github.com/shiena/ansicolor";
{'fraction_non_alphanumeric': 0.12426187419768935, 'fraction_numerical': 0.10590500641848524, 'mean_word_length': 3.0876180482686255, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, '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': '3372676', 'n_tokens_mistral': 3687, 'n_tokens_neox': 3170, 'n_words': 492}