-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tests can't find libjanet on NixOS #88
Comments
Possibly related #36. |
I've encountered a related problem when trying to create an environment to build static binaries, discussion here. With sogaiu's help I created a working flake that bundles jpm which you can find here. The problem with this flake is that jpm seems to want to install new packages under the same hierarchy as janet, so within the flake env, while you can run jpm, you cannot install any packages, because in the nix store, this hierarchy is read-only at runtime. In theory you could bundle all jpm packages you need at flake build time but this will be a hassle in pure builds because nix will disallow network access. I took the easy way out now by doing
so |
NixOS has an unusual filesystem layout in which packages live under unique paths in
/nix/store
, andPATH
and similar environment variables are manipulated to ensure each program can find the libraries meant for it and no others. For example, on my system ,which janet
is/nix/store/n36k55y82g9qlcdxwy7v0gpjwhias7xw-janet-1.33.0/bin/janet
. (Ifjanet
linked to any dynamic libraries, this would be a shell script that sets up the variables and thenexec
s into the actualjanet
binary, but it doesn't so that step isn't necessary.)Although
jpm show-paths
prints the correct paths, for whatever reason, when runningjpm test
, it defaults to/usr/local/lib/libjanet.a
and fails when that file doesn't exist. SettingJANET_LIBPATH
explicitly makes it work.The text was updated successfully, but these errors were encountered: