Building Rust app from source - Cargo.lock not matching

Hi,
I am trying to build an update of asusctl from source to be subsequently able to push it to nixpkgs. That said, I ran into an issue.

As one can see in the nixpkgs repo, the Cargo.lock file is in the repo as well. When I manually replace it with the file from asusctl repo (took it from the v5.0.10 version), I try to build it and end up getting Cargo.lock is not the same in /build/cargo-vendor-dir error.

Is there any way to generate the correct file? I don’t think one should have to manually copy over a couple hundred changes.

I’ll be grateful for any help or guidance.

I’m also curious to know the reason especially if the file Cargo.lock is in the repo.

Maybe this will help: nix run nixpkgs#nix-init -- -u https://github.com/asus-linux/asusctl

Wonderful, this works brilliantly. Thank you so much!