From b356c37023a7015133fd0746f51b9b470338bc4b Mon Sep 17 00:00:00 2001 From: figsoda Date: Tue, 16 Nov 2021 08:18:57 -0500 Subject: [PATCH] vaultwarden: use buildFeatures --- pkgs/tools/security/vaultwarden/default.nix | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/pkgs/tools/security/vaultwarden/default.nix b/pkgs/tools/security/vaultwarden/default.nix index 6bdf428b199b..77ec5a1e8132 100644 --- a/pkgs/tools/security/vaultwarden/default.nix +++ b/pkgs/tools/security/vaultwarden/default.nix @@ -3,10 +3,7 @@ , libiconv, Security, CoreServices , dbBackend ? "sqlite", libmysqlclient, postgresql }: -let - featuresFlag = "--features ${dbBackend}"; - -in rustPlatform.buildRustPackage rec { +rustPlatform.buildRustPackage rec { pname = "vaultwarden"; version = "1.23.0"; @@ -35,14 +32,7 @@ in rustPlatform.buildRustPackage rec { # This may be removed if https://github.com/dani-garcia/vaultwarden/issues/712 is fixed. RUSTC_BOOTSTRAP = 1; - cargoBuildFlags = [ featuresFlag ]; - - checkPhase = '' - runHook preCheck - echo "Running cargo cargo test ${featuresFlag} -- ''${checkFlags} ''${checkFlagsArray+''${checkFlagsArray[@]}}" - cargo test ${featuresFlag} -- ''${checkFlags} ''${checkFlagsArray+"''${checkFlagsArray[@]}"} - runHook postCheck - ''; + buildFeatures = dbBackend; passthru.tests = nixosTests.vaultwarden;