Skip to content

Commit

Permalink
Merge pull request #121 from thillux/cargo-fixes
Browse files Browse the repository at this point in the history
handle empty attrset and line break
  • Loading branch information
nikstur authored Jul 16, 2024
2 parents 35ce4ed + a5b64c7 commit 80cdf87
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 80cdf87

Please sign in to comment.