buildRustPackage: add cargoBuildFlags

This commit is contained in:
Jörg Thalheim
2017-04-15 13:26:50 +02:00
parent 26f5fa8f97
commit 33cfee8177
+4 -3
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 ''