mrjackwills / oxker

A simple tui to view & control docker containers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Track `Cargo.lock`

siph opened this issue · comments

I opened a pull request to package oxker for nix package manager. Nix is highly focused on reproducibility and as a result requires the Cargo.lock file to pin specific dependency versions, otherwise it is impossible to build a cargo project for nixpkgs. As a result I've had to generate the Cargo.lock into a patch file to apply before building. This isn't ideal and makes maintaining more difficult as I will have to generate this file for every update.

Tracking the Cargo.lock file also make sense outside of the nix ecosystem and is considered best practice for binary applications as stated in the cargo book.

That sounds cool, I keep hearing about NixOS all over the place, but haven't given it any time yet.

Yeah I can remove the Cargo.lock from the .gitingore, so that it will be tracked. I only stopped tracking it as it was creating some weird issue with the create_release.sh script that I use to, as the name suggests, create a new release. I'll try to remember, and work out, what the issue was, and find a better solution.

It turns out I don't actually need it because I can pull it from the crates repo, which apparently includes a lock file. I think it's still worth doing though, so I'll leave this issue open unless you want to close it.

Also, nix/nixpkgs is awesome and can be used outside of NixOS on basically any distro or on macOS. It's definitely worth checking out even if only for the massive amount of packaged applications.

Nah, I want to try to do things, with regard to Rust, by the book (The book and by the book), so I should really be tracking Cargo.lock, shouldn't be too much effort to fix it