⚙️ Void Linux Package Installation from Source

🔧 Installing, Configuring, and Patching Suckless Tools via xbps-src

Configuring

  1. Install Xorg, Git, and additional dependencies such as libXft-devel, libX11-devel, libXinerama-devel, and base-devel:
sudo xbps-install -S xorg git base-devel libXft-devel libX11-devel libXinerama-devel
  1. Clone the Void Linux packages repository:
git clone --depth=1 https://github.com/void-linux/void-packages.git
cd void-packages/
./xbps-src binary-bootstrap
  1. Extract the dwm source code:
./xbps-src extract dwm
ls masterdir/builddir/dwm{version}/
  1. Create a files directory inside the dwm source package for your configuration:
mkdir -p srcpkgs/dwm/files
cp masterdir/builddir/dwm{version}/config.def.h srcpkgs/dwm/files/config.h
  1. After modifying config.h for dwm, build and install the package:
./xbps-src pkg dwm
sudo xbps-install -R hostdir/binpkgs dwm

Patching

  1. Create a patches directory in the source package (for example, in st):
mkdir -p srcpkgs/st/patches
  1. Download the patch and place it in the patches directory:
  1. Apply the patch, build, and install st:
./xbps-src extract st
cp masterdir/builddir/st{version}/config.def.h srcpkgs/st/files/config.h
./xbps-src -f pkg st
sudo xbps-install -R hostdir/binpkgs -f st
Note: The same steps apply for other Suckless tools.

🎉 Finish

Et voilà – you've successfully installed and configured the Suckless tools on Void Linux from source!