Revert "buildRustPackage: allow patches to fix Cargo.lock"

This reverts commit b6e881ab72.

We need to fix checksums for this pull request first.

Also see https://github.com/NixOS/nixpkgs/pull/44967
This commit is contained in:
Jörg Thalheim 2018-08-13 12:26:18 +02:00
parent 3dc78e6ae9
commit cfff3eb6c4
2 changed files with 4 additions and 5 deletions

View File

@ -7,7 +7,6 @@ in
{ name, cargoSha256 ? "unset" { name, cargoSha256 ? "unset"
, src ? null , src ? null
, srcs ? null , srcs ? null
, patches ? []
, sourceRoot ? null , sourceRoot ? null
, logLevel ? "" , logLevel ? ""
, buildInputs ? [] , buildInputs ? []
@ -23,7 +22,7 @@ assert cargoVendorDir == null -> cargoSha256 != "unset";
let let
cargoDeps = if cargoVendorDir == null cargoDeps = if cargoVendorDir == null
then fetchcargo { then fetchcargo {
inherit name src srcs patches sourceRoot cargoUpdateHook; inherit name src srcs sourceRoot cargoUpdateHook;
sha256 = cargoSha256; sha256 = cargoSha256;
} }
else null; else null;

View File

@ -1,11 +1,11 @@
{ stdenv, cacert, git, rust, cargo-vendor }: { 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 { stdenv.mkDerivation {
name = "${name}-vendor"; name = "${name}-vendor";
nativeBuildInputs = [ cacert cargo-vendor git rust.cargo ]; nativeBuildInputs = [ cacert cargo-vendor git rust.cargo ];
inherit src srcs patches sourceRoot; inherit src srcs sourceRoot;
phases = "unpackPhase patchPhase installPhase"; phases = "unpackPhase installPhase";
installPhase = '' installPhase = ''
if [[ ! -f Cargo.lock ]]; then if [[ ! -f Cargo.lock ]]; then