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

anki: use fetchCargoVendor #364037

Merged
merged 1 commit into from
Dec 13, 2024
Merged

anki: use fetchCargoVendor #364037

merged 1 commit into from
Dec 13, 2024

Conversation

bananaprotocol
Copy link
Contributor

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.

@bananaprotocol
Copy link
Contributor Author

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review


x86_64-linux

✅ 9 packages built:
  • anki
  • anki-sync-server
  • anki.dist
  • anki.doc
  • anki.man
  • ki
  • ki.dist
  • mnemosyne
  • mnemosyne.dist

@NixOSInfra NixOSInfra added the 12. first-time contribution This PR is the author's first one; please be gentle! label Dec 10, 2024
@ofborg ofborg bot requested review from euank, martinetd and oxij December 11, 2024 17:12
Copy link
Member

@martinetd martinetd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

};
cargoDeps = rustPlatform.fetchCargoVendor {
inherit pname version src;
hash = "sha256-4V75+jS250XfUH6B4VBxtL2t308nyKzhDoq86kq6rp4=";
};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my understanding from looking at the docs last week was that this could be written as follow:

useFetchCargoVendor = true;
cargoHash = "sha256-4V75+jS250XfUH6B4VBxtL2t308nyKzhDoq86kq6rp4";

I don't have a hard preference, either get rid of the lock file which is a pain to update, if someone knows if there's a canonical/preferred way please chime in.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose this has the advantage that you don't need to copy the hash in sync-server, you can just reuse cargoDeps.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there something that'd make cargoHash impossible to inherited just like cagoDeps?

But anyway, as said above, I'm not picky - this is just curiosity asking.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that would also work.

@wegank wegank added 12.approvals: 1 This PR was reviewed and approved by one reputable person 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in the package labels Dec 12, 2024
@FliegendeWurst FliegendeWurst merged commit 035264b into NixOS:master Dec 13, 2024
39 of 40 checks passed
@bananaprotocol bananaprotocol deleted the anki branch December 13, 2024 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: games 10.rebuild-darwin: 1-10 10.rebuild-linux: 1-10 12.approvals: 1 This PR was reviewed and approved by one reputable person 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in the package 12. first-time contribution This PR is the author's first one; please be gentle!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants