koreader: build from source#178320
Conversation
|
My two cents. First and foremost, correcting what you have said before in koreader/koreader-base#1486, using precompiled packages is not frowned upon in Nixpkgs. Indeed it is sometimes a necessity (for closed source programs), or it is sometimes way easier to rely on a precompiled binary instead of a long and intricated process. Second, that being said, most of the time compiling from sources is slower and more tedious and error-prone than using a precompiled file. Nonetheless, many people prefer a compilation from sources. So, I believe the best course of action is to create two derivations: one for tracking the precompiled distribution provided by upstream (call it Third, you are thwarting the raison d'étre here: the process to build from sources is completely different from the process to build from a precompiled. It is like to conflate apples with pears. You do not "patch an apple" in order to produce a pear. |
Fine with me. |
|
Still WIP but very close now. Outstanding issues:
2. ResolvedApparently a nix sandbox escape (!?!?!) by cmake. I'm getting cmake errors which show the outside-the-sandbox paths ( koreader> CMake Error: The source "/build/source/base/thirdparty/lua-rapidjson/build/x86_64-unknown-linux-gnu/lua-rapidjson-prefix/src/lua-rapidjson/CMakeLists.txt" does not match the source "/tmp/nix-build-koreader-2022.05.1.drv-1/ source/base/thirdparty/lua-rapidjson/build/x86_64-unknown-linux-gnu/lua-rapidjson-prefix/src/lua-rapidjson/CMakeLists.txt" used to generate cache. Re-run cmake with a different source directory. Context: Root cause was the fact that I am very stupid. |
|
@ofborg eval |
|
Fixed |
|
Squashed and ready for review here: #178557 |
This still needs quite a bit of cleanup. Will undraftify when ready.
Description of changes
Build
koreaderfrom source instead of downloading binaries.Things done
sandbox = trueset innix.conf? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)nixos/doc/manual/md-to-db.shto update generated release notes