cargo: use fetchFromGitHub

This commit is contained in:
zimbatm 2017-10-08 19:26:40 +01:00
parent 7bd191df6a
commit d170c2cead
2 changed files with 7 additions and 6 deletions

View File

@ -1,4 +1,4 @@
{ stdenv, fetchgit, file, curl, pkgconfig, python, openssl, cmake, zlib
{ stdenv, fetchFromGitHub, file, curl, pkgconfig, python, openssl, cmake, zlib
, makeWrapper, libiconv, cacert, rustPlatform, rustc, libgit2
, version, srcSha, depsSha256
, patches ? []}:
@ -7,9 +7,10 @@ rustPlatform.buildRustPackage rec {
name = "cargo-${version}";
inherit version;
src = fetchgit {
url = "https://github.com/rust-lang/cargo";
rev = version;
src = fetchFromGitHub {
owner = "rust-lang";
repo = "cargo";
rev = version;
sha256 = srcSha;
};

View File

@ -29,8 +29,8 @@ rec {
cargo = callPackage ./cargo.nix rec {
version = "0.21.1";
srcSha = "a64iywv1l3v87b0pznf5kkzxigd6w19myv9d7ka4c65zgrk9n9px";
depsSha256 = "amrgd8ib48vxxbhkvsqqq4p19sc6b74x3cd8p6lhhlm6plrajrvm";
srcSha = "1nz7sz7rzc6i1c0nzf6kmnmaq1l3hgrg19s589q7k309r6m7p7f7";
depsSha256 = "0pzfn1zjgklr0fw9zi9sxrwr08q3wcvdl9ybxrk3ld7ps5h9wmsi";
inherit rustc; # the rustc that will be wrapped by cargo
inherit rustPlatform; # used to build cargo