This PR is for a full flake.nix rewrite, now containing packages (nix build), apps (nix run) and overlays (apply it and enjoy pkgs.forgmartelo); in the process of adding it also a direnv .envrc appeared.
fix: rewrite the flake.nix #1
noth/forgmartelo:main into main i think i should add the package under packages.system.forgemartelo too plus .default
Hey! Thanks for the PR! 😊
I'd be willing to merge this PR. Your last comment makes sense as well though! I leave it to you if you want to do it in this PR.
Just give me some feedback on how you'd like to proceed.
Do I add a cargo test check to the flake? I haven't found any tests in source so I'm doubting it will be useful
I did, and I in fact did a full rewrite of the flake. It now includes:
- Checks (cargo test added to the nix frontend,
nix flake check) - Packages (
nix build .#forgmarteloor justnix build) - Apps (
nix run .#forgmarteloor justnix run) - Overlays (useful for NixOS people, who can add the overlay so they just type
pkgs.forgmarteloinstead ofinputs.forgmartelo.packages.${system}.forgmartelo) - A formatter (
nix fmt, formats AFAIK only the flake)
Also I think anyone who would be merging this would be better off squashing all the commits into one "fix: rework the flake.nix" (I think it would look nicer in a changelog)
oh no
also, can I get some feedback on repo new and especially my changes to the main function (I, myself, don't like it printing help on any error, so I condensed the error printing to a single tracing::error! call)?
plus, if you want some fancier formatting, I can add it, for example printing the level color as the background color instead of text color, and another plus, I can add full on error diagnostics, for example a clap parsing error would show exactly where the parser exploded or an API error would show the response body and other relevant information, or hell even an inquire error would be formatted nicely, and all of that with help messages, "error trees" as I like to call them, basically errors that can have other errors as "causes" or "sources" (that are formatted, again, very nicely)
The flake part of the PR looks really good to me. Thanks for updating it to use flake-parts. That was almost overdue!
For the rest of the PR, please create a new PR that's only features the rust code changes. I guess you can just cherry-pick the latest commit onto a new branch and reset this one to remove the latest commit from the current branch here. If you need help with that, feel free to contact me in the comments here or on matrix: @aviac@voidd.social
@ -26,0 +34,4 @@
let
cfg = rec {
mkDerivation = {
nativeBuildInputs = [ pkgs.pkg-config ];
I think we can scratch that if it's in builtInputs right? Not sure why I added it there in the first place.
Hm, yeah, I think you're correct. I don't really know why it didn't like it when it was just in nativeBuildInputs, but I guess okay
This reverts commit 375ece68e4.
Okay, fixed the structure, now for the flake fix
The PR is ready.
Thanks again! Nice PR 🏅
No due date set.
No dependencies set.
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?