Skip to content
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

Add a flake.nix #3474

Open
sempruijs opened this issue Apr 4, 2024 · 0 comments
Open

Add a flake.nix #3474

sempruijs opened this issue Apr 4, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@sempruijs
Copy link
Sponsor

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

I want the latest version of lazygit from the main branch.
This is super easy with helix for example because helix has a flake.

Describe the solution you'd like
A clear and concise description of what you want to happen.

Add a nix flake. With a nix flake users can:

  1. easily build and run lazygit from source with:
nix run github:jesseduffield/lazygit
  1. Add the flake to a nixos system
    This makes it easy to have to most recent version of lazygit installed.

  2. Setup developer enviourment without thinking about it

If users want to contribute something to lazygit, all they have to do to setup a development enviourment is:

git clone [email protected]:jesseduffield/lazygit.git
cd lazygit
nix develop

This could then install the right version of the compiler, good language servers and more.
Making the development enviourment consistent and super easy to install.
This makes it easy ton contribute to lazygit.

  1. Making CI/CD reproducable

The whole build is reproducible. This can make your CI/CD super stable.
Everything is in a lock file. You control when packages are updated.
This way CI will never break out of the blue.

  1. People can test if the CI locally.

Because the build is reproducible. If it works on your machine locally, it will work on the CI server.
You do not have to commit and push in other to see if the CI works or not.

Flakes are very useful. A lot of repo's have flakes already. Flakes are technically experimental but it is used everywhere.

Describe alternatives you've csonsidered
A clear and concise description of any alternative solutions or features you've considered.

Add no flake.
People have to manually update the lazygit package in the nixpkgs repo.
Your CI might break.

Additional context

NixOS users would love a flake.
Nix is by fas the best build system, it is worth your time to learn nixos.

Recourses to get started.
https://nixos.wiki/wiki/Flakes
https://zero-to-nix.com

@sempruijs sempruijs added the enhancement New feature or request label Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant