<commit_before>{ stdenv, fetchurl, fetchgit, which, file, perl, curl, python27, makeWrapper
, tzdata, git
}:

assert stdenv.gcc.gcc != null;

/* Rust's build process has a few quirks :

- It requires some patched in llvm that haven't landed upstream, so it
  compiles its own llvm. This might change in the future, so at some
  point we may be able to switch to nix's llvm.

- The Rust compiler is written is Rust, so it requires a bootstrap
  compiler, which is downloaded during the build. To make the build
  pure, we download it ourself before and put it where it is
  expected. Once the language is stable (1.0) , we might want to
  switch it to use nix's packaged rust compiler.

*/

with ((import ./common.nix) {inherit stdenv; version = "0.12.0-pre-3edcdbb0";});

let snapshot = if stdenv.system == "i686-linux"
      then "555aca74f9a268f80cab2df1147dc6406403e9e4"
      else if stdenv.system == "x86_64-linux"
      then "6a43c2f6c8ba2cbbcb9da1f7b58f748aef99f431"
      else if stdenv.system == "i686-darwin"
      then "331bd7ef519cbb424188c546273e8c7d738f0894"
      else if stdenv.system == "x86_64-darwin"
      then "2c83a79a9febfe1d326acb17c3af76ba053c6ca9"
      else abort "no-snapshot for platform ${stdenv.system}";
    snapshotDate = "2014-10-04";
    snapshotRev = "749ff5e";
    snapshotName = "rust-stage0-${snapshotDate}-${snapshotRev}-${platform}-${snapshot}.tar.bz2";

in stdenv.mkDerivation {
  inherit name;
  inherit version;
  inherit meta;

  src = fetchgit {
    url = https://github.com/rust-lang/rust;
    rev = "3edcdbb0c01187a0cc6456ca29cd858579459b18";
    sha256 = "0s125x71r0wi7m142nnynpc6vcwlmq4bh8rbysn9cg3bvj5ddgrm";
  };

  # We need rust to build rust. If we don't provide it, configure will try to download it.
  snapshot = stdenv.mkDerivation {
    name = "rust-stage0";
    src = fetchurl {
      url = "http://static.rust-lang.org/stage0-snapshots/${snapshotName}";<commit_msg>rust: updated head<commit_after>{ stdenv, fetchurl, fetchgit, which, file, perl, curl, python27, makeWrapper
, tzdata, git
}:

assert stdenv.gcc.gcc != null;

/* Rust's build process has a few quirks :

- It requires some patched in llvm that haven't landed upstream, so it
  compiles its own llvm. This might change in the future, so at some
  point we may be able to switch to nix's llvm.

- The Rust compiler is written is Rust, so it requires a bootstrap
  compiler, which is downloaded during the build. To make the build
  pure, we download it ourself before and put it where it is
  expected. Once the language is stable (1.0) , we might want to
  switch it to use nix's packaged rust compiler.

*/

with ((import ./common.nix) {inherit stdenv; version = "0.12.0-pre-127-ga0ea210";});

let snapshot = if stdenv.system == "i686-linux"
      then "0644637db852db8a6c603ded0531ccaa60291bd3"
      else if stdenv.system == "x86_64-linux"
      then "656b8c23fbb97794e85973aca725a4b9cd07b29e"
      else if stdenv.system == "i686-darwin"
      then "e4d9709fcfe485fcca00f0aa1fe456e2f164ed96"
      else if stdenv.system == "x86_64-darwin"
      then "6b1aa5a441965da87961be81950e8663eadba377"
      else abort "no-snapshot for platform ${stdenv.system}";
    snapshotDate = "2014-10-10";
    snapshotRev = "78a7676";
    snapshotName = "rust-stage0-${snapshotDate}-${snapshotRev}-${platform}-${snapshot}.tar.bz2";

in stdenv.mkDerivation {
  inherit name;
  inherit version;
  inherit meta;

  src = fetchgit {
    url = https://github.com/rust-lang/rust;
    rev = "a0ea210b394aa1b61d341593a3f9098fe5bf7806";
    sha256 = "0flwzj6dywaq9s77ayinshqbz8na2a1jabkr9s7zj74s2ya5096i";
  };

  # We need rust to build rust. If we don't provide it, configure will try to download it.
  snapshot = stdenv.mkDerivation {
    name = "rust-stage0";
    src = fetchurl {
      url = "http://static.rust-lang.org/stage0-snapshots/${snapshotName}";
{'fraction_non_alphanumeric': 0.10204610204610205, 'fraction_numerical': 0.09531209531209531, 'mean_word_length': 3.732843137254902, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1874368', 'n_tokens_mistral': 1598, 'n_tokens_neox': 1411, 'n_words': 393}