On nixos, I need an environment with lua to develop a C application that interfaces the lua shared libraries, which compiled fine yesterday, but can't any longer because the shell.nix environment doesn't work.
nix-shell -p lua
fails with this error:
_addToLuaPath called for dir /nix/store/wnl9qpnhayry14lhcbdafhadsjwsdr6p-patchelf-0.15.0
[ble: exit 127]
(The second line is just because I'm using blesh, so I don't think it has anything to do with nix)
Incidentally nix-shell works fine with anything other than lua, but other lua versions fail with the same error. (I tried lua5_4_compat)
nix-shell --pure -p lua
works as expected and I can run lua, so I thought it might be a conflicting package. So I removed lua from configuration.nix and ran nix-collect-garbage, even rebooted, however the issue still persists.
Putting it back into configuration.nix also works as expected, and I can run lua.
The strangest part is that everything worked perfectly as expected yesterday but stopped working today. The only consequential thing I've done since then I think is add a library to nix-ld, but I tried removing that and the issue persists.
I'm out of ideas, and any insights would be much appreciated!
$lua -v
Lua 5.2.4 Copyright (C) 1994-2015 Lua, PUC-Rio
$nix --version
nix (Nix) 2.24.12```