Makefile seems to write the read only file system

The error is fairly obvious if you take a look at the error message:

It tries to write to the config sub-directory of the directory which git rev-parse --git-dir outputs. git rev-parse --git-dir fails however (we strip the .git directory), so it returns an empty string; "" + "/config" = "/config".

What you’d do in such a case is check whether you’re able to declare the directory it’s trying to find at runtime using git, ahead of time via a configure option or a patch. Alternatively, you could create a fake mocked “git” which outputs your desired directory.

In this case, it seems to be doing that in order to fetch submodules. That isn’t going to work either way because you don’t have internet access inside the nix sandbox.
The way to fix that would be to fetchSubmodules = true; in fetchFromGitHub (remember to update the hash) and then tell the build system to not try do that on its own which it shouldn’t try to do in the first place. This smells of a bad build system that you aren’t going to have fun with tbh. Expect to patch it a lot.

1 Like