Skip to content

[WIP]tree-wide: use new cargo fetcher#356743

Closed
Bot-wxt1221 wants to merge 0 commit intoNixOS:masterfrom
Bot-wxt1221:cargo
Closed

[WIP]tree-wide: use new cargo fetcher#356743
Bot-wxt1221 wants to merge 0 commit intoNixOS:masterfrom
Bot-wxt1221:cargo

Conversation

@Bot-wxt1221
Copy link
Member

@Bot-wxt1221 Bot-wxt1221 commented Nov 17, 2024

I have writen a script to update it automatically.

Now It can solve:

cargoLock = {
  lockFile = xxx;
  outputhahes = {xxx};
};
cargoLock.lockFile = xxx;
cargoLock.outputHashes = {xxx};

Seems that some package's Cargo.lock in nixpkgs and in source is different. For example, veloren. Hope there are not many package do similar thing. We need to check if hash is correct anyway.

Script: https://github.com/Bot-wxt1221/cargo-rename

Usage:

Compile with gcc. Make sure fetch-cargo.py is in the same path. Exec with a xx/pkgs/by-name/xx/xx/package.nix

cc #327063

#349360

I only try to run it on clash-verge-rev.

Step to reduce(unfinished):

  1. Generate a file list with cargoLock:
rg "cargoLock" --files-with-matches > filewithcargoLock

cat filewithcargoLock | rev | cut -d / -f 2|rev > packagename
  1. run update-all

Now script is OK to run but it will take too long time.

  • Check cfdyndns

  • 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.

@github-actions github-actions bot added the 6.topic: rust General-purpose programming language emphasizing performance, type safety, and concurrency. label Nov 17, 2024
@Bot-wxt1221 Bot-wxt1221 marked this pull request as draft November 17, 2024 16:12
@nix-owners nix-owners bot requested review from figsoda, winterqt and zowoq November 17, 2024 16:13
@Bot-wxt1221 Bot-wxt1221 changed the title tree-wide: use new cargo fetcher [WIP]tree-wide: use new cargo fetcher Nov 17, 2024
@ofborg ofborg 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 Nov 18, 2024
@Bot-wxt1221
Copy link
Member Author

#356862

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: rust General-purpose programming language emphasizing performance, type safety, and concurrency. 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.

1 participant