Skip to content

Commit

Permalink
handle empty attrset and line break
Browse files Browse the repository at this point in the history
Signed-off-by: Markus Theil <theil.markus@gmail.com>
  • Loading branch information
thillux committed Jul 16, 2024
1 parent 35ce4ed commit a5b64c7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions nix/passthru-vendored.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ''
Expand Down

0 comments on commit a5b64c7

Please sign in to comment.