cargo: Remove setupHook

Instead, move that code into buildRustPackage.

The setup hook was only doing part of the work anyway, and having it in
a separate place was obscuring what was really going on.
This commit is contained in:
Ricardo M. Correia 2015-04-23 15:14:34 +02:00
parent e42c17ee97
commit 0cde1dc524
5 changed files with 8 additions and 10 deletions

View file

@ -19,6 +19,12 @@ in stdenv.mkDerivation (args // {
configurePhase = args.configurePhase or "true";
postUnpack = ''
echo "Using cargo deps from $cargoDeps"
cp -r $cargoDeps deps
chmod +w deps -R
export CARGO_HOME=$(realpath deps)
echo "Using rust registry from $rustRegistry"
(
cd $sourceRoot

View file

@ -29,6 +29,4 @@
license = [ licenses.mit licenses.asl20 ];
platforms = platforms.linux;
};
setupHook = ./setup-hook.sh;
}

View file

@ -6,7 +6,7 @@ with ((import ./common.nix) { inherit stdenv; version = "2015-04-14"; });
with rustPlatform;
buildRustPackage rec {
inherit name version meta setupHook;
inherit name version meta;
src = fetchgit {
url = "https://github.com/rust-lang/cargo.git";

View file

@ -1,6 +0,0 @@
if [[ -n "$cargoDeps" ]]; then
echo "Using cargo deps from $cargoDeps"
cp -r $cargoDeps deps
chmod +w deps -R
export CARGO_HOME=$(realpath deps)
fi

View file

@ -20,7 +20,7 @@ let snapshotHash = if stdenv.system == "i686-linux"
in
stdenv.mkDerivation {
inherit name version meta setupHook;
inherit name version meta;
src = fetchurl {
url = "https://static-rust-lang-org.s3.amazonaws.com/cargo-dist/${snapshotDate}/${snapshotName}";