Run build inside non-flake flake input

I was trying to make a simple flake.nix for GitHub - pherrymason/c3-lsp: Language Server for C3 Language so that I could try and use it, also as an excercise to learn a bit more about flakes/packaging.

The problem I ran into is that the package in it’s Makefile runs git clone for two other repos.

My initial attempt was to deal with it in a “hacky” way, adding those repos as inputs and in preConfigure just cp them into the respective locations. This has failed me, as the inputs are read only, so the tresitter-generate which is run inside one of those fails on permission error.

My second attempt was to switch it to git submodules, but that has its own quirks, sice I made the flake with src = ./., it ignored submodules and the only way I could get them working was by adding the entire repo as input with the ?submodule=true enable, but that again caused it to be read only, so the build failed on permission error.

What are the possible ways to deal with this?

For reference, here is my fork with the currently non-working flake.nix from the first attempt.

Got my answer over on reddit, it’s so simple I feel stupid.

“Use flake inputs an just cp -r && chmod +w