Case in point: I am packaging Arcan again , and I have a bit of luck: it compiles and runs durden, pipeworld and prio.
However, I am struggling with the problem of vendored-patched OpenAL. The system OpenAL works OK, but there are specific binaries that need the vendored-patched OpenAL statically built into arcan’s source tree.
In order to do this, the Nixpkgs Way is to
fetchurl all these dependencies along with sources and insert them in the expected places.
However, cmake still tries to fetch these.
Therefore, my question: how can I handle this situation?
 Arcan environment by AndersonTorres · Pull Request #128970 · NixOS/nixpkgs · GitHub
kodi’s cmake also used to force-fetch dependencies regardless of where the source packages were placed. Take a look at the history of kodi in nixpkgs to see how that was worked around.
add_externalProject cmake command should also support hashes. You can checkout the same revision and place it in the expected folder, the hashing should be able to verify that the contents are the same, and won’t attempt to do any network
Just to close this issue: I have patched the cmake scripts, basically removing the git downloads from them.
add_externalProject cmake command should also support hashes
It works only for HTTP downloads. Git is always downloaded, there is no way to pre-cache it.