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 nix flake (derivation + direnv) #28

Merged
merged 1 commit into from
Aug 8, 2023
Merged

Add nix flake (derivation + direnv) #28

merged 1 commit into from
Aug 8, 2023

Conversation

Sigmanificient
Copy link
Contributor

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 cococry merged commit 8d7f642 into cococry:main Aug 8, 2023
@cococry
Copy link
Owner

cococry commented Aug 8, 2023

That's amazing. Thank you

@Sigmanificient Sigmanificient deleted the nix-flake branch August 8, 2023 10:58
@Sigmanificient
Copy link
Contributor Author

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

@cococry
Copy link
Owner

cococry commented Aug 19, 2023 via email

@Sigmanificient
Copy link
Contributor Author

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

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