srid/rust-nix-template

buildRustCrate is deprecated

nouun opened this issue · 2 comments

nouun commented

When cloning the repo and trying to run nix run it errors with the following.

trace: warning: `buildRustCrate` is deprecated, use `buildRustCrateForPkgs` instead
trace: warning: `buildRustCrate` is deprecated, use `buildRustCrateForPkgs` instead
error: store path '/nix/store/v3svm8vpdb16pd1iblkh3dg4rhg8c0wq-rust-nix-template-crate2nix' is not allowed to have references

There's a section in the crate2nix FAQ about this.
https://github.com/kolloch/crate2nix#i-get-a-warning-about-buildrustcrate-being-deprecated-in-favor-of-buildrustcrateforpkgs

srid commented

Could use a PR fixing this.

srid commented

3801d89 is probably not the right approach for this, but it gets rids of the deprecation warning without breaking anything.

Feel free to suggest a better fix!