Emscripten tries to write to /nix

I would like to use a nix shell environment to compile a project that needs emscripten. I have added the emscripten package to it.
I am trying to execute em++ but it fails to build a cache in the /nix directory.
Read-only file system: '/nix/store/<hash>-emscripten-2.0.27/share/emscripten/cache/ports

Is this a bug in the package itself? I guess it should be build in a way that would make it write that cache somewhere else.
Or am I doing something wrong?

1 Like

It seems like it is intended behavior of the package itself, especially when it is being used in building other packages. However the current behavior does not work for interactive shell usage.
See the attached issue for more info and a workaround for development usage: