xmonad/xmonad-testing

Building with Stack on NixOS: missing Xinerama.dll

thblt opened this issue · 5 comments

thblt commented

(I'm just starting to use NixOS, so I'm probably the root cause of my problems.)

I've been trying to compile my XMonad setup under NixOS. To do so, I've copied the nixpkgs.nix from xmonad-testing to my .xmonad, and the nix: declaration from xmonad-testing's stack.yaml into my own.

Trying to building with stack --nix build fails with the message:

Preprocessing executable 'xmonad'  for thblt-xmonad-0.2
[1 of 5] Compiling XMonad.Thblt.Misc [...snip...]
<command line>: can't load .so/.DLL for: libXinerama.so (libXinerama.so: cannot object shared object file: No such file or directory) 

Tbh, I don't even understand why the build would need a .so file...

Are you also using the stack.yaml file from the xmonad-testing repo?

thblt commented

No, I use this one, with the nix: section of the stack.taml from xmonad-testing appended to it.

It sounds like you might be doing something wrong. Try cloning the xmonad-testing repo and running stack --nix build from there and see what happens.

thblt commented

Thanks both of you, the issue was in fact, as someone on Reddit noticed that this bit of TemplateHaskell required that Misc.hs be run at build time to correctly determine the hostname of the build machine and store it in the resulting binary. What I then need to find out is how to provide the X runtime to the build environment, but at least it now makes sense that building requires a dylib.

btw, @pjones or anyone, would you be kind enough to give me your opinion on my proposal on xmonad/xmonad-contrib#70? I don't mind to be told my code sucks if it does, but I'd like to go on with this issue :) Thanks!