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