@@ -4,24 +4,16 @@
44# version that we define here. If you're having problems downloading / finding
55# a Rust library, try updating this to a newer commit.
66
7−{ runCommand, fetchFromGitHub, git }:
8−
9−let
10− version = "2017-06-16";
11− rev = "cda0f689f844710a3d73c7ff459efa64997f73b5";
12− sha256 = "1b3brl9nn3qqaysd8lx9gaazd863grqx547iw7y9j6mkcc7sakvc";
13−
14− src = fetchFromGitHub {
15− inherit rev;
16− inherit sha256;
17−
18− owner = "rust-lang";
19− repo = "crates.io-index";
20− };
21−
22−in
23−
24−runCommand "rustRegistry-${version}-${builtins.substring 0 7 rev}" { inherit src; } ''
7+{ runCommand, fetchFromGitHub, git
8+, src ? fetchFromGitHub {
9+ owner = "rust-lang";
10+ repo = "crates.io-index";
11+ rev = "cda0f689f844710a3d73c7ff459efa64997f73b5";
12+ sha256 = "1b3brl9nn3qqaysd8lx9gaazd863grqx547iw7y9j6mkcc7sakvc";
13+ }
14+}:
15+
16+runCommand "rustRegistry" { inherit src; } ''
2517 # For some reason, cargo doesn't like fetchgit's git repositories, not even
2618 # if we set leaveDotGit to true, set the fetchgit branch to 'master' and clone
2719 # the repository (tested with registry rev