💾 Archived View for thatit.be › 2024-03-24-15-06-03.gmi captured on 2024-05-26 at 14:24:00. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2024-05-10)
➡️ Next capture (2024-06-16)
-=-=-=-=-=-=-
tl;dr:
I had an issue installing my favorite Markdown to Gemini converter (spoiler alert: it’s 7off) under NixOS. Ultimately I came up with a workaround, but it seems like the default packages for chicken in NixOS aren’t able to chicken-install modules. I’ve temporarily resolved this issue with an ugly shell script, and this will at least allow me to build my capsule again, but I have to find a real solution. Presumably fixing the upstram package? I don’t know.
Anyway, I tried to chicken-install 7off and it complained about the filesystem being read only. Which makes sense. The root file system is some immutable thing, but that’s why prefixes exist, right? To be able to use the stuff on your root filesystem and then do your work in a temporary space and maybe, if you’re satisified, copy that stuff to some prefixed location instead of just the root filesystem.
I found a “forum” where I could ask questions, and there was a surprisingly quick reply. That exchange can be found here on the NixOS Discourse.
I wrote a script to set some variables mentioned in Chicken documentation online as a result of a lot of trial and error. I don’t know of a convenient way to download the manual (and it’s a wiki?) and it was a bit rough to find content relevant to my problem. I did a lot of reading and re-reading, gave up, posted to the aforementioned discourse, and then some more searching. There were a handful of additional variables not mentioned in the man page that I found on the web documentation. I can’t even find the sections from that User Manual that addressed them.
Oh! Here it is under Extension tools in the wiki.
I tried tweaking variables until I stopped hitting permissions errors. It was messy. It seems like I needed content from more than one place and it wasn’t clear to me which variables could hold multiple paths in the value. Ultimately I came up with something resembling the following:
set -e PKG=${@} CRP=${CHICKEN_REPOSITORY_PATH} BASE="$(pwd)" cat > env-for-binaries.sh << EOF export CHICKEN_INSTALL_PREFIX="${BASE}/install" export CHICKEN_EGG_CACHE="${BASE}/cache" export CHICKEN_REPOSITORY_PATH="${BASE}/repository" export CHICKEN_INSTALL_REPOSITORY="${BASE}/repository" export CHICKEN_INCLUDE_PATH="${BASE}/include" EOF . env-for-binaries.sh TARGETS=("${CHICKEN_INSTALL_PREFIX}" "${CHICKEN_EGG_CACHE}" "${CHICKEN_REPOSITORY_PATH}" "${CHICKEN_INCLUDE_PATH}") for TARGET in "${TARGETS[@]}" ; do mkdir -p "${TARGET}" done cp -rn "${CRP}"/* "${CHICKEN_REPOSITORY_PATH}" 2>/dev/null || true chicken-install "${PKG[@]}"
I wrote the variables to a file so I could source them later and invoke anything built with the script. I have to manually delete stuff after using it, but I can build my Gemini capsule now.
I have to experiment more to see if I can put the install repository path into the repository variable as an additional path instead of pointing them both at the same place. Or maybe it was an issue with the include path needing to hold more than one path? I’m kind of burnt out at the moment, but I’ll revsit it again soon. And clear up my confusion.
Or, who knows, maybe I’m just doing it all wrong and there’s an easy right way that’s eluding me and none of this nonsense is needed.
updated: 2024-03-24 15:51:53
generated: 2024-05-25