From 012685943f712f2814fc9841ce4e9d3348cd285b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Thu, 9 Sep 2021 19:17:48 +0200 Subject: [PATCH] rust.fetchCargoTarball: remove phases --- pkgs/build-support/rust/fetchCargoTarball.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/build-support/rust/fetchCargoTarball.nix b/pkgs/build-support/rust/fetchCargoTarball.nix index 3b36554e7075..2e8830b47574 100644 --- a/pkgs/build-support/rust/fetchCargoTarball.nix +++ b/pkgs/build-support/rust/fetchCargoTarball.nix @@ -36,9 +36,9 @@ in stdenv.mkDerivation ({ name = "${name}-vendor.tar.gz"; nativeBuildInputs = [ cacert git cargo-vendor-normalise cargo ]; - phases = "unpackPhase patchPhase buildPhase installPhase"; - buildPhase = '' + runHook preBuild + # Ensure deterministic Cargo vendor builds export SOURCE_DATE_EPOCH=1 @@ -69,6 +69,8 @@ in stdenv.mkDerivation ({ # Packages with git dependencies generate non-default cargo configs, so # always install it rather than trying to write a standard default template. install -D $CARGO_CONFIG $name/.cargo/config; + + runHook postBuild ''; # Build a reproducible tar, per instructions at https://reproducible-builds.org/docs/archives/