Archived
6
52
Fork
You've already forked fjo
3

fix: rewrite the flake.nix #1

Merged
Aviac merged 6 commits from noth/forgmartelo:main into main 2024年01月10日 13:32:10 +01:00
Owner
Copy link

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.

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.
Author
Owner
Copy link

i think i should add the package under packages.system.forgemartelo too plus .default

i think i should add the package under packages.system.forgemartelo too plus .default
Owner
Copy link

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.

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.
Author
Owner
Copy link

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

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
Author
Owner
Copy link

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 .#forgmartelo or just nix build)
  • Apps (nix run .#forgmartelo or just nix run)
  • Overlays (useful for NixOS people, who can add the overlay so they just type pkgs.forgmartelo instead of inputs.forgmartelo.packages.${system}.forgmartelo)
  • A formatter (nix fmt, formats AFAIK only the flake)
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 .#forgmartelo` or just `nix build`) - Apps (`nix run .#forgmartelo` or just `nix run`) - Overlays (useful for NixOS people, who can add the overlay so they just type `pkgs.forgmartelo` instead of `inputs.forgmartelo.packages.${system}.forgmartelo`) - A formatter (`nix fmt`, formats AFAIK only the flake)
Author
Owner
Copy link

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)

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)
Author
Owner
Copy link

oh no

oh no
noth changed title from (削除) fix: add package to flake.nix (削除ここまで) to feat: repo new 2024年01月09日 19:30:46 +01:00
noth changed title from (削除) feat: repo new (削除ここまで) to WIP: feat: repo new 2024年01月09日 19:50:58 +01:00
Author
Owner
Copy link

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)

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)
Aviac left a comment

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

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.

I think we can scratch that if it's in `builtInputs` right? Not sure why I added it there in the first place.
Author
Owner

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

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
noth changed title from (削除) WIP: feat: repo new (削除ここまで) to fix: rewrite the flake.nix 2024年01月10日 13:20:02 +01:00
Author
Owner
Copy link

Okay, fixed the structure, now for the flake fix

Okay, fixed the structure, now for the flake fix
Author
Owner
Copy link

The PR is ready.

The PR is ready.
Aviac referenced this pull request from a commit 2024年01月10日 13:32:10 +01:00
Owner
Copy link

Thanks again! Nice PR 🏅

Thanks again! Nice PR 🏅
Commenting is not possible because the repository is archived.
No reviewers
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
VoiDD/fjo!1
Reference in a new issue
VoiDD/fjo
No description provided.
Delete branch "noth/forgmartelo:main"

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?