/bio/skills/blog/math

Running GAP via Devbox on MacOS

I've been using Devbox as an interface for Nix. It allows nicely sandboxed environments for running various programming languages, services, databases, and other software. Recently, I've been playing with GAP (GAP - Groups, Algorithms, Programming), a program to do abstract algebra. I installed it in a devbox shell:

devbox add gap-full

However, when running it, I got an error about dynamic library paths. Taking a cue from Apple's Developer Documentation, I added the following to my devbox.json:

"env": {
    "DYLD_LIBRARY_PATH": "$DEVBOX_PACKAGES_DIR/lib"
  },

That's it! Now I can run GAP!


Note: Although Apple's docuemntation indicated that any of LD_LIBRARY_PATH should also would work, in my case, it did not. I didn't try using DYLD_FALLBACK_LIBRARY_PATH.

2025 Stefano De Vuono