From 4e4d01af81f627fe7ea3221ccd0e2d9a7f4b94e6 Mon Sep 17 00:00:00 2001 From: "Ricardo M. Correia" Date: Wed, 27 May 2015 01:18:30 +0200 Subject: [PATCH] rustc: Use fetchzip in src attr instead of fetchurl Otherwise, `RUST_SRC_PATH` in `racerRust` will point to an invalid path (such as `/nix/store/xxx-rustc-1.0.0.tar.gz/src`, where `rustc-1.0.0.tar.gz` is a real tarball file). --- pkgs/development/compilers/rustc/1.0.0.nix | 2 +- pkgs/development/compilers/rustc/makeRustcDerivation.nix | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/development/compilers/rustc/1.0.0.nix b/pkgs/development/compilers/rustc/1.0.0.nix index bd02397986be..a85ed9290fe2 100644 --- a/pkgs/development/compilers/rustc/1.0.0.nix +++ b/pkgs/development/compilers/rustc/1.0.0.nix @@ -2,7 +2,7 @@ callPackage ./makeRustcDerivation.nix { shortVersion = "1.0.0"; isRelease = true; - srcSha = "1fjyk5xhg9dx85d1kkjmb1jai7awvdmzcjf2fdmi2pdjyzacn163"; + srcSha = "14brziw91d3r88fa1kvpvhap5ws4z8h2mas7h6k9lpsc2zl9blak"; snapshotHashLinux686 = "1ef82402ed16f5a6d2f87a9a62eaa83170e249ec"; snapshotHashLinux64 = "ef2154372e97a3cb687897d027fd51c8f2c5f349"; snapshotHashDarwin686 = "0310b1a970f2da7e61770fd14dbbbdca3b518234"; diff --git a/pkgs/development/compilers/rustc/makeRustcDerivation.nix b/pkgs/development/compilers/rustc/makeRustcDerivation.nix index ae3981f1addc..6208190f8dfd 100644 --- a/pkgs/development/compilers/rustc/makeRustcDerivation.nix +++ b/pkgs/development/compilers/rustc/makeRustcDerivation.nix @@ -1,5 +1,5 @@ -{ stdenv, fetchurl, fetchgit, which, file, perl, curl, python27, makeWrapper -, tzdata, git, valgrind, procps, coreutils +{ stdenv, fetchurl, fetchgit, fetchzip, which, file, perl, curl, python27 +, makeWrapper, tzdata, git, valgrind, procps, coreutils , shortVersion, isRelease , srcSha, srcRev ? "" @@ -85,7 +85,7 @@ stdenv.mkDerivation { inherit meta; src = if isRelease then - fetchurl { + fetchzip { url = "http://static.rust-lang.org/dist/rustc-${version}-src.tar.gz"; sha256 = srcSha; }