Skip to content

feat(nix): add comprehensive Nix flake #4826

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

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

doprz
Copy link

@doprz doprz commented Aug 15, 2025

PR Description

This PR adds Nix flake support to provide a reproducible development environment and build process for lazygit contributors, devs, and users.

Features:

  • Nix Flake Configuration: Complete flake setup supporting multiple architectures
  • Development Shell: Pre-configured environment with Go toolchain, linting tools, and development utilities
  • Multiple Entry Points: Support for nix develop, nix run, and nix build

Please check if the PR fulfills these requirements

n/a as this PR doesn't modify go files.

  • Cheatsheets are up-to-date (run go generate ./...)
  • Code has been formatted (see here)
  • Tests have been added/updated (see here for the integration test guide)
  • Text is internationalised (see here)
  • If a new UserConfig entry was added, make sure it can be hot-reloaded (see here)
  • Docs have been updated if necessary
  • You've read through your own file changes for silly mistakes etc

@doprz doprz changed the title feat(nix): add nix flake with dev shell feat(nix): add comprehensive Nix flake Aug 15, 2025
@stefanhaller
Copy link
Collaborator

I know next to nothing about Nix, and in particular I don't know what Nix flakes are. I don't really want to spend time on learning more about that, either. However, I would have to understand things a little better in order to judge if the PR is good and can be merged. So what can we do?

I see that our current README.md already says something about flakes (here), but I don't understand what it means. Would this have to be changed with your PR?

Any people reading here who are more familiar with Nix and can help review this?

@doprz
Copy link
Author

doprz commented Aug 19, 2025

It seems that someone has already uploaded lazygit to nixpkgs which is what your current README.md references.
https://search.nixos.org/packages?channel=25.05&show=lazygit&query=lazygit

I will update the README.md to include information about the local nix flake. In summary this will allow people that use nix to run your project in an ephemeral shell, install it, and even have a fully setup dev env with go and other dependencies managed by nix.

This will be an official flake that is fully featured while the one on nixpkgs is maintained by others and will either follow the 20.05 or unstable channel.

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