I’m working on updating the nix package for the upcoming release of Textadept.
The previous version of this package was built with make. The makefile used wget to download some archives for 3rd party libraries, which doesn’t work inside a nix derivation. That problem was solved by using
fetchurl to pre-fetch the archives and putting them where the makefile expected them to be, and only then invoking make.
The new version of textadept is built with CMake, and it also wants to download stuff. I tried to use the same trick of pre-fetching the archives. For example I downloaded
scintilla530.tgz and put it where CMake would have put it, in
build/_deps/scintilla-subbuild/scintilla-populate-prefix/src/. However, CMake tries to download it anyway. This may be because it also expects other directories such as
build/_deps/scintilla-subbuild/scintilla-populate-prefix/src/scintilla-populate-stamp to be populated with a lot of additional stuff.
Any suggestions on how to proceed? I’ve been looking through the nixpkgs repo to see how others have handled similar situations, but I haven’t found any examples.
Are there any nix functions that can help with this scenario?
I’m not familiar with CMake, but a cursory web search hasn’t turned up a way (without modifying CMakeLists.txt) to tell CMake to use pre-fetched archives instead of downloading them.
If all else fails, I guess the only option is to work with the developer to modify the CMake configuration to support nix.