buildRustPackage: add cargoBuildFlags

This commit is contained in:
Jörg Thalheim 2017-04-15 11:14:55 +02:00
parent 26f5fa8f97
commit 33cfee8177
No known key found for this signature in database
GPG Key ID: CA4106B8D7CC79FA

View File

@ -7,6 +7,7 @@
, buildInputs ? [] , buildInputs ? []
, cargoUpdateHook ? "" , cargoUpdateHook ? ""
, cargoDepsHook ? "" , cargoDepsHook ? ""
, cargoBuildFlags ? []
, ... } @ args: , ... } @ args:
let let
@ -92,9 +93,9 @@ in stdenv.mkDerivation (args // {
) )
'' + (args.prePatch or ""); '' + (args.prePatch or "");
buildPhase = args.buildPhase or '' buildPhase = with builtins; args.buildPhase or ''
echo "Running cargo build --release" echo "Running cargo build --release ${concatStringsSep " " cargoBuildFlags}"
cargo build --release cargo build --release ${concatStringsSep " " cargoBuildFlags}
''; '';
checkPhase = args.checkPhase or '' checkPhase = args.checkPhase or ''