koreader-from-src: minizip: populate in a simpler manner
This commit is contained in:
parent
267d374b19
commit
a783bc9577
|
@ -144,6 +144,15 @@ let
|
|||
hash = "sha256-gW2ikakS6Omz5upmy26nAo/jkGHYO2kjlB3UmKJBh1k=";
|
||||
};
|
||||
|
||||
minizip-src-ko = fetchFromGitHub {
|
||||
# this is actually just a very old version (2015) of `minizip-ng`
|
||||
owner = "nmoinvaz";
|
||||
repo = "minizip";
|
||||
name = "minizip"; # where to unpack this in `srcs`
|
||||
rev = "0b46a2b4ca317b80bc53594688883f7188ac4d08";
|
||||
hash = "sha256-P/3MMMGYDqD9NmkYvw/thKpUNa3wNOSlBBjANHSonAg=";
|
||||
};
|
||||
|
||||
nanosvg-headers-ko = symlinkJoin {
|
||||
# koreader's heavily-patched mupdf is dependent on a koreader-specific `stb_image_write` extension to nanosvg.
|
||||
# nanosvg is used as a header-only library, so just patch that extension straight into the src.
|
||||
|
@ -347,6 +356,7 @@ let
|
|||
LUA_LIBDIR="${lib.getLib luaEnv}/lib/libluajit-5.1.so" \
|
||||
LUA_RAPIDJSON_ROCK="${rockspecFor "rapidjson"}" \
|
||||
LUA_SPORE_ROCK="${rockspecFor "lua-spore"}" \
|
||||
MINIZIP_DIR="$NIX_BUILD_TOP/minizip" \
|
||||
NANOSVG_HEADERS="${nanosvg-headers-ko}" \
|
||||
NANOSVG_INCLUDE_DIR="${nanosvg-headers-ko}" \
|
||||
OPENSSL_LIB="${lib.getLib openssl}/lib/libssl.so" \
|
||||
|
@ -425,6 +435,7 @@ stdenv.mkDerivation rec {
|
|||
libk2pdfopt-src-ko
|
||||
lodepng-src-ko
|
||||
lunasvg-src-ko
|
||||
minizip-src-ko
|
||||
tesseract-src-ko
|
||||
] ++ (lib.mapAttrsToList
|
||||
(name: src: fetchgit (
|
||||
|
@ -478,7 +489,7 @@ stdenv.mkDerivation rec {
|
|||
--replace-fail ' -rm ' ' # -rm'
|
||||
|
||||
# make some sources writable (only the `sourceRoot` is writable by default)
|
||||
chmod -R u+w "$NIX_BUILD_TOP"/{fbink,kobo-usbms,leptonica,libk2pdfopt,lodepng,lunasvg,tesseract}
|
||||
chmod -R u+w "$NIX_BUILD_TOP"/{fbink,kobo-usbms,leptonica,libk2pdfopt,lodepng,lunasvg,minizip,tesseract}
|
||||
|
||||
# lots of places in Makefile.third (incorrectly) assume lib paths are relative to CURDIR,
|
||||
# so link /nix into CURDIR to allow them to work anyway
|
||||
|
@ -548,6 +559,7 @@ stdenv.mkDerivation rec {
|
|||
skip_download libk2pdfopt
|
||||
skip_download lodepng
|
||||
skip_download lunasvg
|
||||
skip_download minizip
|
||||
|
||||
# outDir should match OUTPUT_DIR in koreader-base
|
||||
outDir="$NIX_BUILD_TOP/koreader/base/build/${stdenv.hostPlatform.config}"
|
||||
|
|
|
@ -235,12 +235,12 @@ in
|
|||
# source.hash = "sha256-gW2ikakS6Omz5upmy26nAo/jkGHYO2kjlB3UmKJBh1k=";
|
||||
# # package: not in nixpkgs
|
||||
# };
|
||||
minizip = {
|
||||
source.url = "https://github.com/nmoinvaz/minizip";
|
||||
source.rev = "0b46a2b4ca317b80bc53594688883f7188ac4d08";
|
||||
source.hash = "sha256-P/3MMMGYDqD9NmkYvw/thKpUNa3wNOSlBBjANHSonAg=";
|
||||
# package = libAndDev minizip; # weird #include incompatibilities... maybe resolvable (looks like this is actually minizip-ng! but from 2015 and slightly patched; used as a lib for mupdf).
|
||||
};
|
||||
# minizip = {
|
||||
# source.url = "https://github.com/nmoinvaz/minizip";
|
||||
# source.rev = "0b46a2b4ca317b80bc53594688883f7188ac4d08";
|
||||
# source.hash = "sha256-P/3MMMGYDqD9NmkYvw/thKpUNa3wNOSlBBjANHSonAg=";
|
||||
# # package = libAndDev minizip; # weird #include incompatibilities... maybe resolvable (looks like this is actually minizip-ng! but from 2015 and slightly patched; used as a lib for mupdf).
|
||||
# };
|
||||
mupdf = {
|
||||
source.url = "https://github.com/ArtifexSoftware/mupdf.git";
|
||||
source.rev = "tags/1.13.0";
|
||||
|
|
Loading…
Reference in New Issue