Solved What happened to xmonad-contrib and some other gripes

xmonad-contrib seems to have been removed from ports and packages along with a lot of other haskell stuff

I wondered why xmonad wouldnt start after upgrading,
then i realized it was because xmonad-contrib had gone walkabout

I came across this thread and this caught my eye

"Ports for Haskell libraries are going to be removed from the ports tree.
Haskell applications are going to be statically linked with all dependencies (diff is also coming soon), so there is no reason to keep Haskell libraries in tree."

Unless im missing something it looks like the Haskell libraries have been removed from ports
and are going to be replace with statically linked versions at some undisclosed time in the future

So in the meantime you cant use any Haskell libraries like xmonad-contrib until the new versions are released
which in my case means i cant use my xmonad set up on freebsd because the config uses xmonad-contrib

Seems an odd way to do things just remove a load of packages people might be using and break their set up,
rather than removing the old packages and adding the new versions when you upgrade

My other gripe is the obs studio plugins packages that dont work because they have dependcies

1 - The obs ndi plugin

obs-ndi-4.9.1 OBS Studio Plugin: Network Device Interface

After you install the obs ndi and open obs studio you get an error message saying missing ndi runtime
please install the linux ndi runtime

On linux you have to install 2 deb packages to get the plugin working,
the plugin deb, and the ndi runtime deb

There isnt a ndi runtime package for freebsd so it seems a bit pointless to create a package for the obs studio ndi plugin
which wont work because you cant you cant install the ndi runtime and then add insult to injury it prompts you to install the linux version

2 - v4l2-sink obs plugin

obs-v4l2sink-0.1.0.12 OBS Studio Plugin: Output as Video4Linux2 device

An OBS Studio plugin that provides output capabilities to a Video4Linux2 device. It is basically a Linux version of obs-virtual-cam, but only contains the video sink part. You can use it with v4l2loopback to achieve cross-program video transfer between OBS Studio and third party software supporting Video4Linux2, e.g. to present an OBS session in proprietary browser-based conferencing systems by selecting the OBS session as a webcam.

Again unless ive missed something there isnt a Video4Linux package on freebsd,
so why create a package for the obs studio v4l2-sink plugin if it wont work

Another thing that annoyed me was when i upgraded to the quarterly branch
and discovered they had removed ffmpeg which removed anything that depened on ffmpeg on my system,
like audio and video players and web browsers

So i just reinstalled freebsd and copied my data back across, i wont be trying the quarterly branch again in a hurry
 
  • Like
Reactions: a6h
libv4l-1.18.0 Video4Linux library
v4l-utils-1.18.0 Video4Linux utilities
v4l_compat-1.18.0 Video4Linux IOCTL header files
Nice one

Think i missed that because i was searching for v4l2

On linux i would create a virtual camera with the following code

Code:
sudo modprobe v4l2loopback devices=1 card_label="OBS Cam" exclusive_caps=1

Have to work out the freebsd version
 
I have dealt with v4l with webcamd(8) and TV tuner cards
Do you need to install all 3 packages

libv4l-1.18.0 Video4Linux library
v4l-utils-1.18.0 Video4Linux utilities
v4l_compat-1.18.0 Video4Linux IOCTL header files

Have you ever created a virtual camera to use with chat programs like google meet,
skype, zoom etc.

There isnt any documentation i could find about setting up a virtual camera on freebsd.
It would be good to get the virtual camera working with obs studio
 
A virtual camera isnt a physical camera,
its a software based video source that shows up as real camera

This lets you do cool stuff like pipe stuff from ffmpeg into the virtual camera and then into chat programs
 
  • Like
Reactions: a6h
I figured out how to install xmonad-contrib with cabal

Here are my notes on github about the steps

xmonad-contrib freebsd install


xmonad and packages needed to build xmonad-contrib

Bash:
# pkg install hs-xmonad ghc hs-stack hs-cabal-install libXft pkgconf

Add ~/.cabal/bin to your $PATH

edit your shell config file and add the following code

Bash:
# cabal bin for haskell
if [ -d "$HOME/.cabal/bin" ]; then
PATH="$HOME/.cabal/bin:$PATH"
fi

  • then source your shell config file

Bash:
source ~/.zshrc

cabal update

download the package list for hackage.haskell.org

Bash:
cabal update

cabal install xmonad-contrib

xmonad-contrib requires you to install libxft C headers

Bash:
cabal install xmonad-contrib --lib --flags="-use_xft"

xmonad build config

create the ~/.xmonad directory

Bash:
mkdir -p ~/.xmonad

rename xmonad.hs to config.hs

rename your xmonad.hs to config.hs

Bash:
mv xmonad.hs config.hs

copy the config.hs file to ~/.xmonad/config.hs

Bash:
mv config.hs ~/.xmonad/


copy the build and xmonad-config.cabal to the ~/.xmonad directory

Bash:
cp /usr/local/share/examples/xmonad/build ~/.xmonad/build
cp /usr/local/share/examples/xmonad/xmonad-config.cabal ~/.xmonad/xmonad-config.cabal


xmonad-config.cabal

edit ~/.xmonad/xmonad-config.cabal

Bash:
vi ~/.xmonad/xmonad-config.cabal

add containers to build-depends

Bash:
name:          xmonad-config

version:       0.0

synopsis:      XMonad Config File

homepage:      http://xmonad.org

license:       BSD2

license-file:  LICENSE

author:        Peter Jones <pjones@devalot.com>

maintainer:    Peter Jones <pjones@devalot.com>

copyright:     Copyright (c) 2016,2017 Peter J. Jones

category:      Graphics

build-type:    Simple

cabal-version: >=1.8


executable xmonad-config

  main-is: config.hs

  build-depends: base, xmonad, xmonad-contrib, containers


run cabal new-update

change directory into the ~/.xmonad directory

Bash:
cd ~/.xmonad

  • run cabal new-update

Bash:
cabal new-update

Make sure your config is named ~/.xmonad/config.hs or change corresponding line in the .cabal file.

Building the config for the first time requires decent amount of time, so it is recommended to manually run the build script before the first startup:

xmonad build

Bash:
~/.xmonad/build

~/.xinitrc

Bash:
# feh set wallpaper

feh --no-fehbg --bg-center --image-bg '#353535' '/home/djwilcox/.config/wallpaper/freebsd.png'


# set the cursor form xmonad

xsetroot -cursor_name left_ptr


# start ssh-agent and window mamager

exec ssh-agent /usr/local/bin/xmonad

xmonad config files on github
 
NapoleonWils0n I tried to install Xmonad today, and stuck because I couldn't able to build the xmonad-contrib. Luckily I found your post,
and it did work perfectly.
Just want to thank you, btw I'm new to Xmonad
 
NapoleonWils0n I tried to install Xmonad today, and stuck because I couldn't able to build the xmonad-contrib. Luckily I found your post,
and it did work perfectly.
Just want to thank you, btw I'm new to Xmonad
Hi Mate

Glad the xmonad-contrib fix worked for you
It took a while to figure out and there wasnt any documentation i could find about using cabal-install
so i had to wing it

Heres my xmonad config if you want a look
 
Hi Mate

Glad the xmonad-contrib fix worked for you
It took a while to figure out and there wasnt any documentation i could find about using cabal-install
so i had to wing it

Heres my xmonad config if you want a look

Is this method of installation still working ? I tried it and it worked initially but then later it started giving an error if trying to recompile - keeps asking to mv and cp a few files somehow
 
Back
Top