cococry / ragnar

Minimal, flexible & user-friendly X tiling window manager
https://ragnarwm.org
GNU General Public License v3.0
997 stars 22 forks source link

Add nix flake (derivation + direnv) #28

Closed Sigmanificient closed 11 months ago

Sigmanificient commented 11 months ago

As PKGBUILD, the flake.nix & flake.lock file provide a way to build a nix derivation (package) for NixOS. I've made a Pull Request for ragnarwm within the official nixpkgs repository along side this pull request.

Build ragner using nix

nix build .

Note: Flakes are still an "experimental feature" of nix despite its wide use.

Moreover, this flake.nix provides a shell with the dependencies required to compile this project. This means that in any Linux distributions, windows WSL or even OSX, and other system supporting the nix package manager you use use it to pull the dependencies and enters in a development shell with everything setup for you.

Entering the shell

nix develop
# do casual stuff
make

This can integrate with direnv to automatically loads thoses dependencies went you enter the directory, once enabled. direnv can integrate within multiples shells (bash, zsh, fish, tcsh, ...)

How to setup automatic direnv in project:

echo "use flake" | tee -a .envrc
direnv allow
cococry commented 11 months ago

That's amazing. Thank you

Sigmanificient commented 11 months ago

@cococry Update on nixpkgs, got RagnarWm to works natively on NixOS, within an automated test! image

cococry commented 11 months ago

Thanks a lot for the effort, really appreciating it! Yohann Boniface @.***> schrieb am Fr. 18. Aug. 2023 um 19:34:

@cococry https://github.com/cococry Update on nixpkgs, got RagnarWm to works natively on NixOS, within an automated test! [image: image] https://user-images.githubusercontent.com/53050011/261674669-9d04a1cd-fd00-4944-8556-9a55c490b234.png

— Reply to this email directly, view it on GitHub https://github.com/cococry/Ragnar/pull/28#issuecomment-1684226672, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXNJRYXA3VRCA4LZGNQ3HRDXV6RSPANCNFSM6AAAAAA3IJCON4 . You are receiving this because you were mentioned.Message ID: @.***>

Sigmanificient commented 11 months ago

@cococry Ragnar is finally available for NixOS, the package has been merge to nixpkgs unstable :eyes: