Oh, there’s a reply via email option? This is cool, let’s see how this
goes…
It’s trying to install files to its installation directory. This means it was
I assumed this was the case.
either deliberately not packaged in a way that permits chicken-install, it
doesn’t support installing to a different prefix, or someone forgot to add a
setting to change the prefix.
I don’t know enough about chicken to even know what to set.
You’ll have to dig into this tool, figure out how you’re supposed to change the
module directory, and maybe upstream a fix to nixpkgs.
After re-reading the chicken manuals a few times and then inspecting the
environment variables that were set, and then a hell of a lot of trial
and error, I came up with the following to be able to fetch and build,
but I don’t know enough about NixOS to even know how to reconcile what
I’ve managed to scrape together with whatever configuration NixOS is
using.
Despite having separate variables, it seems chicken needs to have the
same value set for the install-repository and the repository paths.
Otherwise the build fails when built dependencies are not found in the
repository path.
Anywhere, here’s a pretty terrible script I used to build:
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 named it chicken-scratch.sh
and invoked it thusly:
bash chicken-scratch.sh 7off
. env-for-binaries.sh
./install/bin/7off --help
Resulting binaries are dropped relative to the current directory. For
now, I’ll put them in a path that works for the stuff I need, but this
doesn’t really help anyone else. Oh, and I have to remember to source
the env-for-binaries.sh
that my script drops so deps can be found.