Gomuks - xbps-src template for Void Linux


(last time edited: 2021-03-26)

tags: chat, matrix, terminal


Gomuks is a terminal Matrix client written in Go using mautrix and mauview, made by tulir.


To simplify some jobs you might need to install xtools.

# xbps-install xtools

Then clone all the void-packages templates repository in your home directory.

$ git clone https://github.com/void-linux/void-packages.git

Update your void-packages dir regularly, if you just cloned it right now there is no need to do so.

$ git pull -C /path/to/void-packages

Change directory.

$ cd /path/to/void-packages

Download/update the binary bootstrap.

$ ./xbps-src bootstrap-update

$ ./xbps-src binary-bootstrap

Create a new template.

$ xnew gomuks

Add the following text in the template.

# Template file for 'gomuks'
short_desc="Terminal Matrix client written in Go"
maintainer="me <me@me.com>"

do_install() {
    vbin _build-gomuks-xbps/bin/gomuks

Save and run xlint on the template to check for any errors. Templates are stored in this way void-packages/src/$pkg/template.

$ xlint /path/to/template

If you take a look at the template, I managed to get the SHA256 checksum manually by running sha256sum on the .tar file. Yes it could also be obtained using xgensum gomuks but I like doing it manually and then pasting it on the template.

Now let's build. xbps-src will start downloading dependencies and start building, it might take some time depending on your CPU.

$ ./xbps-src pkg gomuks

Since everything was done correctly now I wanna install the package on my system. Do this inside the void-packages directory.

$ xi gomuks

or which is the same but longer and requires your user to be in the sudoers file:

$ sudo xbps-install --repository=/path/to/void-packages/hostdir/binpkgs gomuks

You can now run gomuks in your virtual terminal by just running:

$ gomuks

Happy chatting!