Skip to content

Commit

Permalink
crane-utils: bump dependencies (#508)
Browse files Browse the repository at this point in the history
  • Loading branch information
ipetkov authored Jan 28, 2024
1 parent 960d350 commit c5a3c5d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions lib/downloadCargoPackageFromGit.nix
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@ let
in
runCommand "cargo-git" deps ''
mkdir -p $out
existing_crates=()
declare -A existing_crates
while read -r cargoToml; do
local crate=$(
cargo metadata --format-version 1 --no-deps --manifest-path "$cargoToml" |
jq -r '.packages[] | select(.manifest_path == "'"$cargoToml"'") | "\(.name)-\(.version)"'
)
if [ -n "$crate" ]; then
if [[ " ''${existing_crates[*]} " =~ " $crate " ]]; then
if [[ -n "''${existing_crates["$crate"]}" ]]; then
>&2 echo "warning: skipping duplicate package $crate found at $cargoToml"
continue
fi
Expand All @@ -65,7 +65,7 @@ runCommand "cargo-git" deps ''
crane-resolve-workspace-inheritance "$cargoToml" > "$dest/Cargo.toml.resolved" &&
mv "$dest/Cargo.toml"{.resolved,}
existing_crates+=("$crate")
existing_crates["$crate"]='1'
fi
done < <(find ${repo} -name Cargo.toml)
''
8 changes: 4 additions & 4 deletions pkgs/crane-utils/Cargo.lock

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

2 changes: 1 addition & 1 deletion pkgs/crane-utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ publish = false
anyhow = "1"
serde_json = "1"
serde = { version = "1", features = ["derive"] }
toml_edit = "0.20.1"
toml_edit = "0.21.0"

[dev-dependencies]
pretty_assertions = "1.3.0"
2 changes: 1 addition & 1 deletion pkgs/crane-utils/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ rustPlatform.buildRustPackage {

src = lib.sourceFilesBySuffices ./. [ ".rs" ".toml" ".lock" ];

cargoSha256 = "sha256-joZrcKKByaGopWzPhaytCSU+LnlhQaNIXZoh40UCSrM=";
cargoSha256 = "sha256-/ybcjLrjLBuL8jYN0thBQtqyrpKDPAltF9sRqc98Yw0=";
}

0 comments on commit c5a3c5d

Please sign in to comment.