Skip to content

Commit

Permalink
vendorCargoDeps: handle unused patch dependencies (#581)
Browse files Browse the repository at this point in the history
  • Loading branch information
ipetkov authored Apr 7, 2024
1 parent 1e44708 commit b47c407
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Fixed
* `inheritCargoArtifactsHook` and `installCargoArtifactsHook` now correctly
handle the case when `CARGO_TARGET_DIR` is set to a nested directory
* Dependency vendoring now correctly takes unused patch dependencies into
account

## [0.16.3] - 2024-03-19

Expand Down
5 changes: 5 additions & 0 deletions checks/simple-git/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions checks/simple-git/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,8 @@ tag = "v1.13.1"
version = "*"
git = "https://github.com/dtolnay/rustversion.git"
rev = "2abd4d0e00db08bb91145cb88e5dcbad2f45bbcb"

# Intentionally unused patch dependency
# https://github.com/ipetkov/crane/issues/576
[patch.crates-io]
unicode-ident = { git = "https://github.com/dtolnay/unicode-ident.git", rev = "a8736e7e62be959d87970d2d137a098ba533d78b" }
2 changes: 1 addition & 1 deletion lib/vendorMultipleCargoDeps.nix
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ let
allPackagesTrimmed = map
(l: map
(filterAttrs (k: _: allowedAttrs.${k} or false))
(l.package or [ ])
((l.package or [ ]) ++ (l.patch.unused or [ ]))
)
cargoLocksParsed;

Expand Down

0 comments on commit b47c407

Please sign in to comment.