Install gcloud and other commands without too much hustle

So I’ve been happy to be crafting my own packages so that I can install github libraries that are not available in guix by default. This though comes at a cost of the hours you have to spend to build a solid package definition. I’ve been glad to do this for some libraries that are very important for me, such as a lot of AI utilities (gptel latest version, or tool-use commit, claude-code, emacs-copilot, etc).

Right now I’m developing for my company and delivery schedule is tighter. I need to install utilities such as an exotic vpn client (globalconnect, that uses rust as a build system), or the typical cloud CLIs such as gcloud.

These are all packaged well for apt, but not available in guix.

Is there a faster route to install them in my machine, without having to craft a package specially for that library? (maybe some channel I don’t know, or any tip would be helpful).

PS: I guess docker is an answer of course, but not really what I’d prefer.

Yeah, packaging is very time consuming. It’s my biggest grievance with the general Linux software space, IMO some of the worst use of (hard working, motivated, highly knowledgeable) dev time. Anyway, here’s some extra ways to install packages (by example).

Here is a collection of public Guix channels: https://toys.whereis.social/ . I found ripgrep-all in this collection.

If they distribute in flatpak you can install using it in Guix shell. Here is an example installing the latest version of Jami:

guix shell flatpak -- flatpak --user remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
guix shell flatplak -- flatpak install flathub net.jami.Jami
guix shell flatpak -- flatpak run net.jami.Jami

If they distribute in AppImage, you gotta jump through some serious hoops, but here’s a Java app that got put in the format:

export _JAVA_AWT_WM_NONREPARENTING=1
export AWT_TOOLKIT=MToolkit

guix shell --network --container --emulate-fhs \
     --development ungoogled-chromium gcc-toolchain font-ipa-mj-mincho jbr mesa \
     xf86-video-amdgpu libdrm \
     --preserve='^_JAVA_AWT_WM_NONREPARENTING$' --preserve='^AWT_TOOLKIT$' \
     --preserve='^DISPLAY$' --preserve='^XAUTHORITY$' --expose="${XAUTHORITY}" \
     --share=$HOME/.local/share/kanji-dojo/ \
     --preserve='^DBUS_' --share=/var/run/dbus \
     --share=/sys/dev --share=/sys/devices --share=/dev/dri \
     --share=/tmp \
     -- /home/zjabbar/notes/data/kanji_dojo/kanji_dojo.AppImage --appimage-extract-and-run

You need to let the app image run in an environment using the FHS, but that puts it in a container, so you need to share (prob better to expose) a bunch of devices and install a bunch of required packages.

Finally you can use the Nix package manager on Guix very easily using the nix-service-type . That package manager allows for binaries to be distributed, so it’s much easier to package some things for it. Seems like claude-code has been merged?

Amazing answer, thank you so much!

I found this video also mentioning the distrobox option: https://www.youtube.com/watch?v=UsY00oWBgJw

1 Like