I’m getting the following error in a GitHub action on macOS
/nix/store/3z9jfr419kz91rzx0sq5880k14s70sjk-cctools-binutils-darwin-wrapper-927.0.2/nix-support/setup-hook: line 134: ${cmd^^}${role_post}=${cmd}: bad substitution
As I don’t have a Mac available locally, It’s especially difficult to understand what’s going on.
Can you offer any hints on how to understand what is going on?
looks to me an illegal bash command. A guess out of the blue, the darwin system is using the system’s bash (which behaves bit differently on macos vs linux). I git grepped ${cmd^^}${role_post} and it’s coming from nigpkgs/pkgs/build-support/bintools-wrapper/setup-hook.sh I wonder if you can avoid running this by using clang or more darwin specific compilation tools. Sorry if Im not of much help.
Hmm, interesting. Looking at the source code, maybe setting NIX_BUILD_SHELL environment variable to bash in the GH workflow and adding bashInteractive to shell.nix would be able to bypass this? Or are inputs added to the environment too late?