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

Nix-based xmonad-contrib hacking: this needs to be recorded somewhere #906

Open
geekosaur opened this issue Sep 27, 2024 · 1 comment
Open

Comments

@geekosaur
Copy link
Contributor

[27 20:07:27] <wisconsin> hi, is there a walkthrough somewhere explaining how to build and test xmonad and xmonad-contrib using nix?
[27 20:08:54] <wisconsin> i have some minor improvements i'd like to submit to xmonad-contrib, but im unfamiliar with haskell's + nix tooling, and no longer have access to a simpler arch setup.
[27 20:17:07] <Lears> wisconsin: Not that I'm aware of, but you can pretty much just `nix develop .` in your xmonad-contrib clone then use cabal like normal.
[27 21:26:22] <wisconsin> Lears: Thanks, I had gotten that far, but then had some trouble with cabal. what's the cabal workflow?
[27 21:28:37] <geekosaur> mine is `cabal build` until it seems to be ready, then build my config against it to test, but I have a fully cabalized config (https://github.com/geekosaur/xmonad.hs)
[27 21:29:35] <geekosaur> I suspect it won't help much with a Nix setup since it's all very cabal + git
[27 21:31:33] <Lears> There isn't really one workflow. I mostly just let `ghcid -a` rebuild with cabal when I write changes. When I'm ready to test, I point the flake's NixOS module at the local branch and rebuild my system.
[27 21:32:45] <Lears> Rather, I point my system flake at the local branch's.
[27 21:33:31] <wisconsin> Lears: yes, i had done that with other WMs, pointing to locally patched branches, i'll see if can do that too.
[27 21:34:40] <Lears> wisconsin: If you're on NixOS, see https://github.com/xmonad/xmonad-contrib/blob/master/NIX.md for an intro to using the the flake.
[27 22:28:03] <wisconsin> Lears: thanks, and how do i test my xmonad-contrib in nixos once its building?
[27 22:36:12] <Lears> wisconsin: By using it with the xmonad-contrib flake, as the link above details, with the system flake input like: `xmonad-contrib = { type = "git"; url = "file:///path/to/xmonad-contrib"; ref = "your-pr-branch" };
[27 22:45:04] <wisconsin> Lears: thanks, im a bit confused about the last part as my system is not yet in flake form, just traditional. I only use flakes for dev envs. i'll try to see if i can figure it out.

One thing this needs, aside from some cleaning up, is expansion to non-NixOS (and, as the last line says, to non-flake-based systems).

@osv
Copy link

osv commented Dec 7, 2024

I will safe to my notes somewhere

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

No branches or pull requests

2 participants