-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add Nix flake to biscuit-cli #56
Conversation
There are no rust tests (the CLI exposes the library directly), only e2e tests using bats |
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'll let @divarvel give the final approval as I'm merely an educated observer of this repository
nativeBuildInputs = with pkgs; [ | ||
cargo | ||
clippy | ||
libiconv | ||
rustc | ||
rustfmt | ||
rust-analyzer | ||
]; | ||
}; |
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.
Shouldn't we have the same shell in both the flake and the classic shell.nix?
Note that one can pkgs.callPackage ./shell.nix
in here if needed.
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.
This question might more to the core contributors than yourself @er4hn :)
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 don't really use the shell.nix anymore, feel free to harmonize as needed.
inherit system; | ||
}; | ||
|
||
naersk' = pkgs.callPackage naersk {}; |
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.
Have you considered using the overlay provided by naersk directly?
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.
What is that? I'm not super familiar with Nix and used the naersk template suggested by their github repo.
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.
Overlays are a way to override packages definition (in a lazy recursive manner) but in that case they don't bring much. It would have let you extend the pkgs
to include ones provided by naersk and have it available with pkgs.naersk
.
In this case it doesn't matter and it's totally fine to stick to the official example.
thanks for the contribution! i'll let you address (or not) the points raised by @ptitfred and i'll merge |
Nothing is mandatory |
Thank you. I updated to remove the un-needed parenthesis. If it is fine with everyone else I will skip the other suggested changes. |
Gentle nudge, it looks like the workflow needs to be triggered by a maintainer to accept this. |
Ah right, sorry. |
Add a Nix flake to biscuit-cli so it's easier to make use of
nix develop
andnix shell
when playing with biscuits.I tested that the
biscuit
program works when runningnix shell
. I tested thatcargo run
,cargo test
(there are no tests?),cargo fmt --check
, andcargo clippy
all work innix develop
.Really like the project and I find nix flakes make it easier to pull something down and play with it without doing too much installation.