Skip to content

Package program, init flake and devshell#74

Merged
JayanAXHF merged 1 commit intoJayanAXHF:mainfrom
es-sai-fi:main
Feb 27, 2026
Merged

Package program, init flake and devshell#74
JayanAXHF merged 1 commit intoJayanAXHF:mainfrom
es-sai-fi:main

Conversation

@es-sai-fi
Copy link

I don't know how familiar you are with Nix but a Nix devshell fits perfectly here, I also added a shell hook to install the pre-push hook you provide.

If this gets merged then anyone interested in contributing the project would be able to get a development environment by executing direnv allow and also get the program in their system by using the provided flake/non-flake entry point.

Let me know if you need me to explain anything...

@es-sai-fi
Copy link
Author

Let me know if they commit messages fit and also should I update the readme to add development environment setup instructions with Nix and the installation of the program?

Copy link
Owner

Thanks a lot for packaging this for Nix. You can go ahead with updating the README with the instructions for nix. Please squash your commits after that :)

@es-sai-fi es-sai-fi force-pushed the main branch 5 times, most recently from 12d7c4a to f9aca2d Compare February 26, 2026 22:56
@es-sai-fi es-sai-fi marked this pull request as ready for review February 26, 2026 22:56
@es-sai-fi
Copy link
Author

Done :)

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 26, 2026

Greptile Summary

This PR adds comprehensive Nix infrastructure including flake support, development shell, and package derivation, enabling both NixOS users and contributors to easily install and develop the project.

Key Changes:

  • Added flake.nix with support for Linux and Darwin (macOS) systems, including both x86_64 and aarch64 architectures
  • Created package.nix with standard Rust package derivation using rustPlatform.buildRustPackage
  • Implemented development shell (shell.nix) with Rust toolchain, Nix formatters (nil, alejandra), and automatic pre-push hook installation
  • Added comprehensive NixOS installation documentation for both flake and non-flake users with multiple versioning strategies

Documentation Updates:

  • Removed Homebrew installation section (check if intentional - seems unrelated to Nix addition)
  • Correctly removed documentation for non-existent -e, --env flag

The Nix implementation is well-structured and follows Nix best practices. The devshell provides a complete development environment with all necessary tools and automatically installs the pre-push hook, improving contributor onboarding.

Important Files Changed

Filename Overview
flake.nix Added Nix flake with support for Linux and Darwin (macOS) systems, includes both release and debug build variants
package.nix Standard Rust package derivation using rustPlatform with proper metadata and license information
shell.nix Development shell with Rust toolchain, Nix formatters, and automatic pre-push hook installation
README.md Added comprehensive NixOS installation instructions, removed Homebrew section and outdated -e flag documentation

Last reviewed commit: 4a608dd

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

8 files reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

@es-sai-fi
Copy link
Author

Sorry for the messy log, should be good to go now.

Copy link
Owner

@JayanAXHF JayanAXHF left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks a lot for this

- Initialize development shell
- Add package derivation
- Add flake entrypoint
- Add non-flake entrypoint
- Document Nix installation and development setup in README
Copy link
Owner

@JayanAXHF JayanAXHF left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checks out, we can always improve later. Thanks!

@JayanAXHF JayanAXHF merged commit 993b462 into JayanAXHF:main Feb 27, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants