aaronjanse / 3mux

Terminal multiplexer inspired by i3
MIT License
1.82k stars 46 forks source link

add flake.nix #114

Closed aaronjanse closed 3 years ago

aaronjanse commented 3 years ago

Nix is a declarative package manager used by myself and many of our users. This PR lets Nix users try 3mux by simply running:

nix run github:aaronjanse/3mux

This is made possible by replacing shell.nix with flake.nix, which supports some cool features in Nix 2.4 like the command above.

Sadly, to a non-Nix-user, the code in this PR is undecipherable. In the Nix world, the flake.nix added here is fairly standard, with defaultPackage specifying the default package (for nix shell github:aaronjanse/3mux) and defaultApp specifying the default executable (for nix run github:aaronjanse/3mux).

aaronjanse commented 3 years ago

Oh, heads up that this can be tested via nix run github:aaronjanse/3mux/mar2021-add-flake, although I assume you don't want to install Nix just to test a PR

PotatoParser commented 3 years ago

Oh, heads up that this can be tested via nix run github:aaronjanse/3mux/mar2021-add-flake, although I assume you don't want to install Nix just to test a PR

Nah, I'll definitely install Nix :)

nikhiljha commented 3 years ago

You can test this PR with docker run -it nixpkgs/nix-unstable nix run "github:aaronjanse/3mux/mar2021-add-flake" --experimental-features "nix-command flakes" if you don't have Nix :)