gitu
gitu copied to clipboard
Adds Nix flake for building on NixOS
Closes #54 (ignoring macOS for the time being--my Nix install in that env is borked). Might need some extra buildInputs
for macOS/Darwin, happy to amend when I can.
Nice work! Please update the readme with install instructions as well :)
Just for my own learning, why is crane
needed given that you can just give rustPlatform.buildRustPackage
the local lockfile?
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 83.03%. Comparing base (
7c0f628
) to head (14da72b
).
Additional details and impacted files
@@ Coverage Diff @@
## master #56 +/- ##
=======================================
Coverage 83.03% 83.03%
=======================================
Files 32 32
Lines 2564 2564
=======================================
Hits 2129 2129
Misses 435 435
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
I'll leave this here just for a day or two to gather input, as I'm not adept with nix myself. A mention in the README would be nice!
Just for my own learning, why is
crane
needed given that you can just giverustPlatform.buildRustPackage
the local lockfile?
Crane is a relatively-simplified way of making a temporary Rust environment on Nix platforms with platform-specific requirements, checks, and the like, so that gitu
's builds are (more) reproducible. Helix's example shows a more comprehensive use-case. In my experience it just makes building easier, but if there's enough pushback I'm happy to change it. Also it's what I've used in the past and what has worked for my devops deployments.
gitu is already packaged in the official nixpkgs repo: https://github.com/NixOS/nixpkgs/blob/ddbd484a31481757a93d1ce7122dcb8469ff5fb2/pkgs/by-name/gi/gitu/package.nix
this will provide a binary cache, and it works on both macOS and linux
this flake does provide a devShell, which would be useful for local development if maintainers want to lock their development dependencies
gitu is already packaged in the official nixpkgs repo: https://github.com/NixOS/nixpkgs/blob/ddbd484a31481757a93d1ce7122dcb8469ff5fb2/pkgs/by-name/gi/gitu/package.nix
Oh, I swear I searched and couldn't find it, but when I look now it's right there. Cheers!
Feel free to tag me in on any nix-related stuff in the future if needed, particularly if it would otherwise go unmaintained
Amazing! I'll merge this. :+1: