From 33cfee81777341cd335ccbe237db329b3fc7c444 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sat, 15 Apr 2017 11:14:55 +0200 Subject: [PATCH] buildRustPackage: add cargoBuildFlags --- pkgs/build-support/rust/default.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkgs/build-support/rust/default.nix b/pkgs/build-support/rust/default.nix index 91569d0c070a..1287d401e4a2 100644 --- a/pkgs/build-support/rust/default.nix +++ b/pkgs/build-support/rust/default.nix @@ -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 ''