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

Ship Cargo.lock #11

Merged
merged 3 commits into from
Mar 21, 2024
Merged

Ship Cargo.lock #11

merged 3 commits into from
Mar 21, 2024

Conversation

nshalman
Copy link
Contributor

Thank you for writing this! I haven't even had a chance to play with it because I got nerd-sniped by trying to package it into nixpkgs first...

Per the removed comment:

# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html

Additional Reference: https://github.com/NixOS/nixpkgs/blob/master/doc/languages-frameworks/rust.section.md#buildrustpackage-compiling-rust-applications-with-cargo-compiling-rust-applications-with-cargo

Per the instructions in the Cargo Book best practices guide, Rust applications should always commit the Cargo.lock file in git to ensure a reproducible build. However, a few packages do not, and Nix depends on this file, so if it is missing you can use cargoPatches to apply it in the patchPhase. Consider sending a PR upstream with a note to the maintainer describing why it's important to include in the application.

@ynqa
Copy link
Owner

ynqa commented Mar 21, 2024

@nshalman Thanks for your contributing. LGTM! 👏

@ynqa ynqa merged commit 4ed6399 into ynqa:main Mar 21, 2024
6 checks passed
@nshalman nshalman deleted the add-lock branch March 21, 2024 13:29
@nshalman nshalman mentioned this pull request Mar 21, 2024
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants