Replace cargo2nix with Crane and optimize Flake#63
Conversation
| use nix | ||
| if command -v nix &>/dev/null; then | ||
| use flake | ||
| fi |
There was a problem hiding this comment.
I would think direnv already does the check when setting use flake ?
There was a problem hiding this comment.
When I last tested it multiple months ago, direnv would fail if it didn't have the flake module loaded and I omitted the command check. It's definitely possible that has changed in recent versions of direnv, though; feel free to send a link to a changelog entry or commit and I'll gladly simplify this.
| inputs.nixpkgs.follows = "nixpkgs"; | ||
| }; | ||
| advisory-db = { | ||
| url = "github:rustsec/advisory-db"; |
There was a problem hiding this comment.
Yes, it provides a way to audit dependencies for vulnerabilities via https://rustsec.org/.
|
I dont know what is the best now for nix + rust. I think I used crane for another package. Per package caching sounds nice, and the removal of Cargo.nix is awesome too. I think I approve but I am not maintainer on the repo. |
|
@lafrenierejm would you like to become a maintainer ? maybe @elizagamedev could give you access if positive ? |
Crane obsoletes the need for `Cargo.nix` by parsing dependencies directly from `Cargo.lock` and improves build times by building and caching dependencies as their own Nix derivation.
@teto I would be glad to help maintain this project. The call is entirely @elizagamedev's, though. |
Crane obsoletes the need for
Cargo.nixby parsing dependencies directly fromCargo.lockand improves build times by building and caching dependencies as their own Nix derivation.