`/usr/local/share/examples/xmonad/build' does not produce the xmonad-ARCH (xmonad-x86_64-freebsd) executable. The default ghc build script _will_ successfully do this. In other words: If a user copies the example build script (as directed by `make install') to their ~/.xmonad directory then the executable emitted will be called `xmonad' and thus `/usr/local/bin/xmonad' will fail upon being called by `startx' (since it can't find xmonad-ARCH). For more context: https://github.com/xmonad/xmonad/issues/270
A commit references this bug: Author: arrowd Date: Mon Feb 1 18:50:33 UTC 2021 New revision: 563606 URL: https://svnweb.freebsd.org/changeset/ports/563606 Log: x11-wm/hs-xmonad: Fix the example build script. PR: 253167 Changes: head/x11-wm/hs-xmonad/Makefile head/x11-wm/hs-xmonad/files/example_buildscript
Thanks for the report, I think I fixed it. Can you verify, please?
(In reply to Gleb Popov from comment #2) On a fresh install with the example build script copied into the ~/.xmonad directory with my own xmonad.hs I receive the messages saying: `No cabal.project file or cabal file matching the default glob './*.cabal' was found.', followed by: `Please create a package description file <pkgname>.cabal or a cabal.project file referencing the packages you want to build'.
(In reply to klmanion from comment #3) Follow instructions in pkg-message, it says that you also should copy an example .cabal file.
(In reply to Gleb Popov from comment #4) Sorry about that. You are correct: This issue is resolved. Thank you.
My apologies, I closed this too soon. The build scripts works well enough to get the xmonad session up and running, but is _still_ not producing the xmonad-ARCH binary. This makes it impossible for the xmonad.hs to be used as stated in the issue.
(In reply to klmanion from comment #6) I run `~/.xmonad/build foo` and get an executable named foo, so the script seems to work. What exactly doesn't work for you? Maybe you add some logging to the build to see what's going on? Otherwise, I need concrete steps to reproduce the problem.
Created attachment 222165 [details] output of `xmonad --recompile' output of `xmonad --recompile' while the /usr/local/share/examples/xmonad/build is in the ~/.xmonad directory.
(In reply to Gleb Popov from comment #7) I uploaded the output of `xmonad --recompile' is there any other output I can provide?
A commit references this bug: Author: arrowd Date: Mon Feb 15 18:25:25 UTC 2021 New revision: 565321 URL: https://svnweb.freebsd.org/changeset/ports/565321 Log: x11-wm/hs-xmonad: Improve the sample build script. PR: 253167 Changes: head/x11-wm/hs-xmonad/Makefile head/x11-wm/hs-xmonad/files/example_buildscript
I've updated the script again and double-checked that it works for me. Try it out.