From cfff3eb6c416a881abbacdc2751ac40db2e2aa86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Mon, 13 Aug 2018 12:26:18 +0200 Subject: [PATCH] Revert "buildRustPackage: allow patches to fix Cargo.lock" This reverts commit b6e881ab72fbd0bb50b58668b457f7a79ceb8993. We need to fix checksums for this pull request first. Also see https://github.com/NixOS/nixpkgs/pull/44967 --- pkgs/build-support/rust/default.nix | 3 +-- pkgs/build-support/rust/fetchcargo.nix | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/pkgs/build-support/rust/default.nix b/pkgs/build-support/rust/default.nix index 8265fff2c61c..fb1d6e390ae1 100644 --- a/pkgs/build-support/rust/default.nix +++ b/pkgs/build-support/rust/default.nix @@ -7,7 +7,6 @@ in { name, cargoSha256 ? "unset" , src ? null , srcs ? null -, patches ? [] , sourceRoot ? null , logLevel ? "" , buildInputs ? [] @@ -23,7 +22,7 @@ assert cargoVendorDir == null -> cargoSha256 != "unset"; let cargoDeps = if cargoVendorDir == null then fetchcargo { - inherit name src srcs patches sourceRoot cargoUpdateHook; + inherit name src srcs sourceRoot cargoUpdateHook; sha256 = cargoSha256; } else null; diff --git a/pkgs/build-support/rust/fetchcargo.nix b/pkgs/build-support/rust/fetchcargo.nix index 2670ed528640..42a3ac27cb5b 100644 --- a/pkgs/build-support/rust/fetchcargo.nix +++ b/pkgs/build-support/rust/fetchcargo.nix @@ -1,11 +1,11 @@ { stdenv, cacert, git, rust, cargo-vendor }: -{ name ? "cargo-deps", src, srcs, patches, sourceRoot, sha256, cargoUpdateHook ? "" }: +{ name ? "cargo-deps", src, srcs, sourceRoot, sha256, cargoUpdateHook ? "" }: stdenv.mkDerivation { name = "${name}-vendor"; nativeBuildInputs = [ cacert cargo-vendor git rust.cargo ]; - inherit src srcs patches sourceRoot; + inherit src srcs sourceRoot; - phases = "unpackPhase patchPhase installPhase"; + phases = "unpackPhase installPhase"; installPhase = '' if [[ ! -f Cargo.lock ]]; then