From a5b64c7a8c880e78b9804275e4ae40c3fcb50906 Mon Sep 17 00:00:00 2001 From: Markus Theil Date: Tue, 16 Jul 2024 11:32:45 +0200 Subject: [PATCH] handle empty attrset and line break Signed-off-by: Markus Theil --- nix/passthru-vendored.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nix/passthru-vendored.nix b/nix/passthru-vendored.nix index e505ba2..4987a31 100644 --- a/nix/passthru-vendored.nix +++ b/nix/passthru-vendored.nix @@ -14,13 +14,13 @@ outputs = [ "out" ]; phases = [ "unpackPhase" "patchPhase" "configurePhase" "buildPhase" "installPhase" ]; buildPhase = '' - cargo cyclonedx --spec-version 1.4 --format json --target ${pkgs.stdenv.hostPlatform.rust.rustcTarget} + cargo cyclonedx --spec-version 1.4 --format json --target ${pkgs.stdenv.hostPlatform.rust.rustcTarget} \ '' + pkgs.lib.optionalString - (builtins.hasAttr "buildNoDefaultFeatures" previousAttrs) + (builtins.hasAttr "buildNoDefaultFeatures" previousAttrs && previousAttrs.buildNoDefaultFeatures) " --no-default-features" + pkgs.lib.optionalString - (builtins.hasAttr "buildFeatures" previousAttrs) + (builtins.hasAttr "buildFeatures" previousAttrs && builtins.length previousAttrs.buildFeatures > 0) (" --features " + builtins.concatStringsSep "," previousAttrs.buildFeatures) ; installPhase = ''