1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2026-05-22 10:15:43 +02:00

feat(nix): add comprehensive nix flake

Co-authored-by: Eveeifyeve
This commit is contained in:
doprz
2025-08-14 21:49:49 -05:00
committed by Stefan Haller
parent 97762f484f
commit 6b8853c027
7 changed files with 357 additions and 5 deletions
+50 -5
View File
@@ -388,19 +388,64 @@ sudo zypper ar https://download.opensuse.org/repositories/devel:/languages:/go/$
sudo zypper ref && sudo zypper in lazygit
```
### NixOs
### NixOS
On NixOs lazygit is packaged with nix and distributed via nixpkgs.
You can try the lazygit without installing it with:
#### Using lazygit from nixpkgs
On NixOS, lazygit is packaged with nix and distributed via nixpkgs.
You can try lazygit without installing it with:
```sh
nix-shell -p lazygit
# or with flakes enabled
nix run nixpkgs#lazygit
```
Or you can add lazygit to your `configuration.nix` using the `environment.systemPackages` option.
More details can be found via NixOS search [page](https://search.nixos.org/).
Or you can add lazygit to you `configuration.nix` using the `environment.systemPackages` option.
More details can be found via NixOs search [page](https://search.nixos.org/).
#### Using the official lazygit flake
This repository includes a nix flake that provides the latest development version and additional development tools:
**Run lazygit directly from the repository:**
```sh
nix run github:jesseduffield/lazygit
# or from a local clone
nix run .
```
**Build lazygit from source:**
```sh
nix build github:jesseduffield/lazygit
# or from a local clone
nix build .
```
**Development environment:**
For contributors, the flake provides a development shell with Go toolchain, development tools, and dependencies:
```sh
nix develop github:jesseduffield/lazygit
# or from a local clone
nix develop
```
The development shell includes:
- Go toolchain
- git and make
- Proper environment variables for development
**Using in other flakes:**
The flake also provides an overlay for easy integration into other flake-based projects:
```nix
{
inputs.lazygit.url = "github:jesseduffield/lazygit";
outputs = { self, nixpkgs, lazygit }: {
# Use the overlay
nixpkgs.overlays = [ lazygit.overlays.default ];
};
}
```
### Flox