because GHC has dropped explicit support for FreeBSD.
To be honest, I didn't quite understand what the drama was. I used to use cabal for this, but for the last year I've been using stack. Therefore, the only thing I had to do was to install hs-stack. Therefore, here is a guide that will absolutely install xmonad with version 0.17.1 on FreeBSD 13.2.
Code:
pkg install hs-stack
mkdir ~/.config/xmonad
cd ~/.config/xmonad
git clone --branch v0.17.1 https://github.com/xmonad/xmonad
git clone --branch v0.17.1 https://github.com/xmonad/xmonad-contrib
touch stack.yaml
# stack.yaml
resolver: lts-19.6
packages:
- xmonad
- xmonad-contrib
# xinitrc
exec /home/user/.cache/xmonad/xmonad-x86_64-freebsd
# or
# exec /home/user/.local/bin/xmonad
# and in .cshrc
setenv PATH "${PATH}:/usr/home/user/.local/bin"
stack upgrade
stack install
# You can run two variants of xmonad binaries:
# (1) command 'stack install' creates/updates /home/user/.local/bin/xmonad
# or
# (2) command 'xmonad-recompile' creates/updates /usr/home/user/.cache/xmonad/xmonad-x86_64-freebsd
# It is better to use /usr/home/user/.cache/xmonad/xmonad-x86_64-freebsd since
# this file is not recompiled every time xorg is started.
The resolver version (lts-19.6) here is taken from the same stack.yaml file from the xmonad repository version 0.17.1. For xmonad 0.18.0 this does not work, but this is not a reason to be upset, since such problems have happened before. You can compile 0.17.1 and use it. I just took ZFS snapshots and saved the working versions. In my case, these xmonad libraries are weakly sensitive (or not at all) to regular updates of FreeBSD 13.2. They don't break when updating, they just work.
xmonad is dead on freebsd at the moment
GHC has dropped explicit support for FreeBSD. New releases don't have upstream bindists.
I am trying to develop a small project in Haskell. GHCup is the officially provided installer for GHC ( compiler ) and for Haskell development tools such as Haskell language server, ghci, ghcid, cabal, and stack. I was following the directions for installation of GHCup on FreeBSD (...
forums.freebsd.org
The question is what is meant by
new releases of GHC. Current stable releases? For example, in my case, I installed the latest version of xmonad 0.17.1 using stack using my guide and the version of ghc installed by stack was 9.0.2. While current stable releases are 9.8.1, 9.6.4, 9.4.8. Now I see that there are bindists for version 9.2.8. Which, in general, is not a very outdated version:
Hardware: Lenovo Thinkpad Yoga Operating System: FreeBSD-13.2-RELEASE cat ~/.ghcup/logs/ghcup.log Debug: Identified platform as: FreeBSD, 13.2-RELEASE Debug: last access was 6.174976388s ago, cache...
github.com
And 9.4.5:
Content for the stackage.org site. Contribute to commercialhaskell/stackage-content development by creating an account on GitHub.
github.com
Its better to use Stack (from docs):
Code:
There are two widely used Haskell build tools:
* [Stack][stack]
* [cabal-install][cabal-install]
We include instructions for both.
Unless you already know which one you prefer, use Stack, which is easier.
Perhaps I underestimated the situation, darkness is getting closer to xmonad on FreeBSD, and I urgently need to learn how to configure Sway WM and switch to Wayland (it's a joke, I already have everything ready, if xmonad disappears today, I will just launch `sway`) ?