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:
parent
e42c17ee97
commit
0cde1dc524
@ -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
|
||||
|
@ -29,6 +29,4 @@
|
||||
license = [ licenses.mit licenses.asl20 ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
|
||||
setupHook = ./setup-hook.sh;
|
||||
}
|
||||
|
@ -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";
|
||||
|
@ -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
|
@ -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}";
|
||||
|
Loading…
Reference in New Issue
Block a user