Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

treewide: migrate to fetchCargoVendor, batch 4 #376150

Open
wants to merge 1 commit into
base: staging
Choose a base branch
from

Conversation

alyssais
Copy link
Member

@alyssais alyssais commented Jan 23, 2025

Cargo 1.84.0 seems to have changed the output format of cargo vendor again, once again invalidating fetchCargoTarball FOD hashes. It's time to fix this once and for all, switching across the board to fetchCargoVendor, which is not dependent on cargo vendor's output format.

It should be possible to reproduce this diff. To generate it, I first ran:

xargs sed -i 's/fetchCargoTarball/fetchCargoVendor/g'

The following manually identified list of files were given as standard input:

Input
pkgs/applications/graphics/drawpile/default.nix
pkgs/applications/graphics/gnome-decoder/default.nix
pkgs/applications/graphics/gnome-obfuscate/default.nix
pkgs/applications/misc/openbangla-keyboard/default.nix
pkgs/applications/version-management/git-cinnabar/default.nix
pkgs/applications/version-management/mercurial/default.nix
pkgs/applications/version-management/silver-platter/default.nix
pkgs/applications/virtualization/krunvm/default.nix
pkgs/development/libraries/librsvg/default.nix
pkgs/development/python-modules/aardwolf/default.nix
pkgs/development/python-modules/adblock/default.nix
pkgs/development/python-modules/ahocorasick-rs/default.nix
pkgs/development/python-modules/bcrypt/default.nix
pkgs/development/python-modules/biliass/default.nix
pkgs/development/python-modules/chromadb/default.nix
pkgs/development/python-modules/clarabel/default.nix
pkgs/development/python-modules/cmsis-pack-manager/default.nix
pkgs/development/python-modules/copykitten/default.nix
pkgs/development/python-modules/cramjam/default.nix
pkgs/development/python-modules/cryptg/default.nix
pkgs/development/python-modules/cryptography/default.nix
pkgs/development/python-modules/css-inline/default.nix
pkgs/development/python-modules/deebot-client/default.nix
pkgs/development/python-modules/deltalake/default.nix
pkgs/development/python-modules/etebase/default.nix
pkgs/development/python-modules/evtx/default.nix
pkgs/development/python-modules/fastcrc/default.nix
pkgs/development/python-modules/flaxlib/default.nix
pkgs/development/python-modules/gb-io/default.nix
pkgs/development/python-modules/glean-sdk/default.nix
pkgs/development/python-modules/hf-transfer/default.nix
pkgs/development/python-modules/jh2/default.nix
pkgs/development/python-modules/johnnycanencrypt/default.nix
pkgs/development/python-modules/kurbopy/default.nix
pkgs/development/python-modules/libcst/default.nix
pkgs/development/python-modules/lzallright/default.nix
pkgs/development/python-modules/netifaces2/default.nix
pkgs/development/python-modules/nh3/default.nix
pkgs/development/python-modules/nlpo3/default.nix
pkgs/development/python-modules/nutils-poly/default.nix
pkgs/development/python-modules/nutpie/default.nix
pkgs/development/python-modules/orjson/default.nix
pkgs/development/python-modules/pdoc-pyo3-sample-library/default.nix
pkgs/development/python-modules/pendulum/default.nix
pkgs/development/python-modules/primp/default.nix
pkgs/development/python-modules/py-sr25519-bindings/default.nix
pkgs/development/python-modules/pycddl/default.nix
pkgs/development/python-modules/pydantic-core/default.nix
pkgs/development/python-modules/pyperscan/default.nix
pkgs/development/python-modules/pysequoia/default.nix
pkgs/development/python-modules/python-bidi/default.nix
pkgs/development/python-modules/python-kadmin-rs/default.nix
pkgs/development/python-modules/qiskit-terra/default.nix
pkgs/development/python-modules/regress/default.nix
pkgs/development/python-modules/rpds-py/default.nix
pkgs/development/python-modules/rtoml/default.nix
pkgs/development/python-modules/rustworkx/default.nix
pkgs/development/python-modules/safetensors/default.nix
pkgs/development/python-modules/skytemple-rust/default.nix
pkgs/development/python-modules/sourmash/default.nix
pkgs/development/python-modules/spacy-alignments/default.nix
pkgs/development/python-modules/sudachipy/default.nix
pkgs/development/python-modules/test-results-parser/default.nix
pkgs/development/python-modules/tiktoken/default.nix
pkgs/development/python-modules/tokenizers/default.nix
pkgs/development/python-modules/tree-sitter-make/default.nix
pkgs/development/python-modules/typst/default.nix
pkgs/development/python-modules/whenever/default.nix
pkgs/development/python-modules/y-py/default.nix
pkgs/development/python-modules/zxcvbn-rs-py/default.nix
pkgs/development/r-modules/default.nix
pkgs/games/ddnet/default.nix
pkgs/servers/matrix-synapse/plugins/rendezvous.nix
pkgs/tools/filesystems/ceph/default.nix
pkgs/tools/filesystems/ceph/old-python-packages/cryptography.nix

Then I ran:

xargs -n 1 nix-update --version=skip

With this list of attributes corresponding to the changed files given as standard input:

Input
drawpile
gnome-decoder
gnome-obfuscate
ibus-engines.openbangla-keyboard
git-cinnabar
mercurial
silver-platter
krunvm
librsvg
python3Packages.aardwolf
python3Packages.adblock
python3Packages.ahocorasick-rs
python3Packages.bcrypt
python3Packages.biliass
python3Packages.chromadb
python3Packages.clarabel
python3Packages.cmsis-pack-manager
python3Packages.copykitten
python3Packages.cramjam
python3Packages.cryptg
python3Packages.cryptography
python3Packages.css-inline
python3Packages.deebot-client
python3Packages.deltalake
python3Packages.etebase
python3Packages.evtx
python3Packages.fastcrc
python3Packages.flaxlib
python3Packages.gb-io
python3Packages.glean-sdk
python3Packages.hf-transfer
python3Packages.jh2
python3Packages.johnnycanencrypt
python3Packages.kurbopy
python3Packages.libcst
python3Packages.lzallright
python3Packages.netifaces2
python3Packages.nh3
python3Packages.nlpo3
python3Packages.nutils-poly
python3Packages.nutpie
python3Packages.orjson
python3Packages.pdoc-pyo3-sample-library
python3Packages.pendulum
python3Packages.primp
python3Packages.py-sr25519-bindings
python3Packages.pycddl
python3Packages.pydantic-core
python3Packages.pyperscan
python3Packages.pysequoia
python3Packages.python-bidi
python3Packages.python-kadmin-rs
python3Packages.qiskit-terra
python3Packages.regress
python3Packages.rpds-py
python3Packages.rtoml
python3Packages.rustworkx
python3Packages.safetensors
python3Packages.skytemple-rust
python3Packages.sourmash
python3Packages.spacy-alignments
python3Packages.sudachipy
python3Packages.test-results-parser
python3Packages.tiktoken
python3Packages.tokenizers
python3Packages.tree-sitter-make
python3Packages.typst
python3Packages.whenever
python3Packages.y-py
python3Packages.zxcvbn-rs-py
rPackages.gifski
rPackages.timeless
ddnet
matrix-synapse-plugins.matrix-http-rendezvous-synapse
ceph.python.pkgs.bcrypt
ceph.python.pkgs.cryptography

The list of files for the first command and the list of attributes for the second command are in the same order, so it should be easy enough to check their correspondence by putting them side by side.

It might be possible to parallelize the nix-update operations using xargs' -P option. I haven't tested it.

I also manually removed the now-outdated comment in pkgs/development/libraries/librsvg/default.nix.

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 1.84.0 seems to have changed the output format of cargo vendor
again, once again invalidating fetchCargoTarball FOD hashes.  It's
time to fix this once and for all, switching across the board to
fetchCargoVendor, which is not dependent on cargo vendor's output
format.

It should be possible to reproduce this diff.  To generate it, I first
ran:

	xargs sed -i 's/fetchCargoTarball/fetchCargoVendor/g'

The following manually identified list of files were given as standard
input:

	pkgs/applications/graphics/drawpile/default.nix
	pkgs/applications/graphics/gnome-decoder/default.nix
	pkgs/applications/graphics/gnome-obfuscate/default.nix
	pkgs/applications/misc/openbangla-keyboard/default.nix
	pkgs/applications/version-management/git-cinnabar/default.nix
	pkgs/applications/version-management/mercurial/default.nix
	pkgs/applications/version-management/silver-platter/default.nix
	pkgs/applications/virtualization/krunvm/default.nix
	pkgs/development/libraries/librsvg/default.nix
	pkgs/development/python-modules/aardwolf/default.nix
	pkgs/development/python-modules/adblock/default.nix
	pkgs/development/python-modules/ahocorasick-rs/default.nix
	pkgs/development/python-modules/bcrypt/default.nix
	pkgs/development/python-modules/biliass/default.nix
	pkgs/development/python-modules/chromadb/default.nix
	pkgs/development/python-modules/clarabel/default.nix
	pkgs/development/python-modules/cmsis-pack-manager/default.nix
	pkgs/development/python-modules/copykitten/default.nix
	pkgs/development/python-modules/cramjam/default.nix
	pkgs/development/python-modules/cryptg/default.nix
	pkgs/development/python-modules/cryptography/default.nix
	pkgs/development/python-modules/css-inline/default.nix
	pkgs/development/python-modules/deebot-client/default.nix
	pkgs/development/python-modules/deltalake/default.nix
	pkgs/development/python-modules/etebase/default.nix
	pkgs/development/python-modules/evtx/default.nix
	pkgs/development/python-modules/fastcrc/default.nix
	pkgs/development/python-modules/flaxlib/default.nix
	pkgs/development/python-modules/gb-io/default.nix
	pkgs/development/python-modules/glean-sdk/default.nix
	pkgs/development/python-modules/hf-transfer/default.nix
	pkgs/development/python-modules/jh2/default.nix
	pkgs/development/python-modules/johnnycanencrypt/default.nix
	pkgs/development/python-modules/kurbopy/default.nix
	pkgs/development/python-modules/libcst/default.nix
	pkgs/development/python-modules/lzallright/default.nix
	pkgs/development/python-modules/netifaces2/default.nix
	pkgs/development/python-modules/nh3/default.nix
	pkgs/development/python-modules/nlpo3/default.nix
	pkgs/development/python-modules/nutils-poly/default.nix
	pkgs/development/python-modules/nutpie/default.nix
	pkgs/development/python-modules/orjson/default.nix
	pkgs/development/python-modules/pdoc-pyo3-sample-library/default.nix
	pkgs/development/python-modules/pendulum/default.nix
	pkgs/development/python-modules/primp/default.nix
	pkgs/development/python-modules/py-sr25519-bindings/default.nix
	pkgs/development/python-modules/pycddl/default.nix
	pkgs/development/python-modules/pydantic-core/default.nix
	pkgs/development/python-modules/pyperscan/default.nix
	pkgs/development/python-modules/pysequoia/default.nix
	pkgs/development/python-modules/python-bidi/default.nix
	pkgs/development/python-modules/python-kadmin-rs/default.nix
	pkgs/development/python-modules/qiskit-terra/default.nix
	pkgs/development/python-modules/regress/default.nix
	pkgs/development/python-modules/rpds-py/default.nix
	pkgs/development/python-modules/rtoml/default.nix
	pkgs/development/python-modules/rustworkx/default.nix
	pkgs/development/python-modules/safetensors/default.nix
	pkgs/development/python-modules/skytemple-rust/default.nix
	pkgs/development/python-modules/sourmash/default.nix
	pkgs/development/python-modules/spacy-alignments/default.nix
	pkgs/development/python-modules/sudachipy/default.nix
	pkgs/development/python-modules/test-results-parser/default.nix
	pkgs/development/python-modules/tiktoken/default.nix
	pkgs/development/python-modules/tokenizers/default.nix
	pkgs/development/python-modules/tree-sitter-make/default.nix
	pkgs/development/python-modules/typst/default.nix
	pkgs/development/python-modules/whenever/default.nix
	pkgs/development/python-modules/y-py/default.nix
	pkgs/development/python-modules/zxcvbn-rs-py/default.nix
	pkgs/development/r-modules/default.nix
	pkgs/games/ddnet/default.nix
	pkgs/servers/matrix-synapse/plugins/rendezvous.nix
	pkgs/tools/filesystems/ceph/default.nix
	pkgs/tools/filesystems/ceph/old-python-packages/cryptography.nix

Then I ran:

	xargs -n 1 nix-update --version=skip

With this list of attributes corresponding to the changed files given
as standard input:

	drawpile
	gnome-decoder
	gnome-obfuscate
	ibus-engines.openbangla-keyboard
	git-cinnabar
	mercurial
	silver-platter
	krunvm
	librsvg
	python3Packages.aardwolf
	python3Packages.adblock
	python3Packages.ahocorasick-rs
	python3Packages.bcrypt
	python3Packages.biliass
	python3Packages.chromadb
	python3Packages.clarabel
	python3Packages.cmsis-pack-manager
	python3Packages.copykitten
	python3Packages.cramjam
	python3Packages.cryptg
	python3Packages.cryptography
	python3Packages.css-inline
	python3Packages.deebot-client
	python3Packages.deltalake
	python3Packages.etebase
	python3Packages.evtx
	python3Packages.fastcrc
	python3Packages.flaxlib
	python3Packages.gb-io
	python3Packages.glean-sdk
	python3Packages.hf-transfer
	python3Packages.jh2
	python3Packages.johnnycanencrypt
	python3Packages.kurbopy
	python3Packages.libcst
	python3Packages.lzallright
	python3Packages.netifaces2
	python3Packages.nh3
	python3Packages.nlpo3
	python3Packages.nutils-poly
	python3Packages.nutpie
	python3Packages.orjson
	python3Packages.pdoc-pyo3-sample-library
	python3Packages.pendulum
	python3Packages.primp
	python3Packages.py-sr25519-bindings
	python3Packages.pycddl
	python3Packages.pydantic-core
	python3Packages.pyperscan
	python3Packages.pysequoia
	python3Packages.python-bidi
	python3Packages.python-kadmin-rs
	python3Packages.qiskit-terra
	python3Packages.regress
	python3Packages.rpds-py
	python3Packages.rtoml
	python3Packages.rustworkx
	python3Packages.safetensors
	python3Packages.skytemple-rust
	python3Packages.sourmash
	python3Packages.spacy-alignments
	python3Packages.sudachipy
	python3Packages.test-results-parser
	python3Packages.tiktoken
	python3Packages.tokenizers
	python3Packages.tree-sitter-make
	python3Packages.typst
	python3Packages.whenever
	python3Packages.y-py
	python3Packages.zxcvbn-rs-py
	rPackages.gifski
	rPackages.timeless
	ddnet
	matrix-synapse-plugins.matrix-http-rendezvous-synapse
	ceph.python.pkgs.bcrypt
	ceph.python.pkgs.cryptography

The list of files for the first command and the list of attributes for
the second command are in the same order, so it should be easy enough
to check their correspondence by putting them side by side.

It might be possible to parallelize the nix-update operations using
xargs' -P option.  I haven't tested it.

I also manually removed the now-outdated comment in
pkgs/development/libraries/librsvg/default.nix.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant