-
Notifications
You must be signed in to change notification settings - Fork 13
Replace cargo2nix with Crane and optimize Flake #63
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
base: main
Are you sure you want to change the base?
Conversation
use nix | ||
if command -v nix &>/dev/null; then | ||
use flake | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would think direnv already does the check when setting use flake
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is that to check for vunerabilities ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.nix
by parsing dependencies directly fromCargo.lock
and improves build times by building and caching dependencies as their own Nix derivation.