Skip to content

cargo-expand: use fetchCargoVendor#374508

Closed
Liamolucko wants to merge 1 commit intoNixOS:masterfrom
Liamolucko:cargo-expand-fetch-cargo-vendor
Closed

cargo-expand: use fetchCargoVendor#374508
Liamolucko wants to merge 1 commit intoNixOS:masterfrom
Liamolucko:cargo-expand-fetch-cargo-vendor

Conversation

@Liamolucko
Copy link
Contributor

cargo-expand is currently broken on macOS due to rust-lang/cargo#13662. It's now using bat 0.25, which has a directory
src/syntax_mapping/builtins/macos that's only kept around by a .gitkeep file, and when that's left out it causes the build to fail while attempting to open the directory.

fetchCargoVendor doesn't have that bug, so using it instead of the default fetcher works around the problem.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

`cargo-expand` is currently broken on macOS due to rust-lang/cargo#13662.
It's now using bat 0.25, which has a directory
src/syntax_mapping/builtins/macos that's only kept around by a
`.gitkeep` file, and when that's left out it causes the build to fail
while attempting to open the directory.

`fetchCargoVendor` doesn't have that bug, so using it instead of the
default fetcher works around the problem.
@github-actions github-actions bot added 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Jan 17, 2025
@nix-owners nix-owners bot requested review from figsoda and xrelkd January 17, 2025 10:53
@alyssais
Copy link
Member

Done on staging in #376038.

@Liamolucko Liamolucko closed this Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants