koreader-from-src: vendor zlib
This commit is contained in:
parent
29a4466750
commit
cc50ad172c
|
@ -15,10 +15,11 @@
|
||||||
, luajit
|
, luajit
|
||||||
, sdcv
|
, sdcv
|
||||||
, SDL2
|
, SDL2
|
||||||
|
, substituteAll
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
luajit_lua52 = luajit.override { enable52Compat = true; };
|
luajit_lua52 = luajit.override { enable52Compat = true; };
|
||||||
thirdparty = import ./sources.nix;
|
sources = import ./sources.nix;
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "koreader-from-src";
|
pname = "koreader-from-src";
|
||||||
|
@ -38,7 +39,18 @@ stdenv.mkDerivation rec {
|
||||||
inherit (s) url rev hash name;
|
inherit (s) url rev hash name;
|
||||||
leaveDotGit = true; # maybe not needed, but we'd need another way to query the rev during build process below
|
leaveDotGit = true; # maybe not needed, but we'd need another way to query the rev during build process below
|
||||||
deepClone = true; # probably not needed
|
deepClone = true; # probably not needed
|
||||||
}) thirdparty);
|
}) sources.thirdparty);
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
(substituteAll (
|
||||||
|
{
|
||||||
|
src = ./vendor-external-projects.patch;
|
||||||
|
} // (lib.mapAttrs
|
||||||
|
(_proj: source: fetchurl source)
|
||||||
|
sources.externalProjects
|
||||||
|
)
|
||||||
|
))
|
||||||
|
];
|
||||||
|
|
||||||
sourceRoot = "koreader";
|
sourceRoot = "koreader";
|
||||||
|
|
||||||
|
@ -103,7 +115,7 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
'' + builtins.concatStringsSep "\n" (builtins.map
|
'' + builtins.concatStringsSep "\n" (builtins.map
|
||||||
(l: ''install_lib "${l.name}" "${l.rev}"'')
|
(l: ''install_lib "${l.name}" "${l.rev}"'')
|
||||||
thirdparty
|
sources.thirdparty
|
||||||
) + ''
|
) + ''
|
||||||
|
|
||||||
make TARGET=debian DEBIAN=1 INSTALL_DIR="$out" SHELL=sh VERBOSE=1
|
make TARGET=debian DEBIAN=1 INSTALL_DIR="$out" SHELL=sh VERBOSE=1
|
||||||
|
|
|
@ -1,20 +1,29 @@
|
||||||
[
|
{
|
||||||
{
|
thirdparty = [
|
||||||
url = "https://github.com/LuaJIT/LuaJIT";
|
{
|
||||||
rev = "8635cbabf3094c4d8bd00578c7d812bea87bb2d3";
|
url = "https://github.com/LuaJIT/LuaJIT";
|
||||||
hash = "sha256-8ij/Zjss8Rz5fKL9LJuRiTQdoT9OVMNOY1a4D2hRcEU=";
|
rev = "8635cbabf3094c4d8bd00578c7d812bea87bb2d3";
|
||||||
name = "luajit";
|
hash = "sha256-8ij/Zjss8Rz5fKL9LJuRiTQdoT9OVMNOY1a4D2hRcEU=";
|
||||||
}
|
name = "luajit";
|
||||||
{
|
}
|
||||||
url = "https://github.com/libjpeg-turbo/libjpeg-turbo.git";
|
{
|
||||||
rev = "3.0.0";
|
url = "https://github.com/libjpeg-turbo/libjpeg-turbo.git";
|
||||||
hash = "sha256-CEqlV/LzF5okvPwUDyqDBvL4bTGc6TYqfADHtRLPJb4=";
|
rev = "3.0.0";
|
||||||
name = "libjpeg-turbo";
|
hash = "sha256-CEqlV/LzF5okvPwUDyqDBvL4bTGc6TYqfADHtRLPJb4=";
|
||||||
}
|
name = "libjpeg-turbo";
|
||||||
{
|
}
|
||||||
url = "https://gitlab.com/koreader/djvulibre.git";
|
{
|
||||||
rev = "6a1e5ba1c9ef81c205a4b270c3f121a1e106f4fc";
|
url = "https://gitlab.com/koreader/djvulibre.git";
|
||||||
hash = "sha256-H0HWR+hpAYLGbBdY3BwxgKPUrWhrIsVMnoURdbn8iIE=";
|
rev = "6a1e5ba1c9ef81c205a4b270c3f121a1e106f4fc";
|
||||||
name = "djvulibre";
|
hash = "sha256-H0HWR+hpAYLGbBdY3BwxgKPUrWhrIsVMnoURdbn8iIE=";
|
||||||
}
|
name = "djvulibre";
|
||||||
]
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
externalProjects = {
|
||||||
|
zlib = {
|
||||||
|
url = "http://gentoo.osuosl.org/distfiles/zlib-1.2.13.tar.xz";
|
||||||
|
hash = "sha256-0Uw44xOvw1qah2Da3yYEL1HqD10VSwYwox2gVAEH+5g=";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
diff --git a/base/thirdparty/zlib/CMakeLists.txt b/base/thirdparty/zlib/CMakeLists.txt
|
||||||
|
index 2350186d..76a7c97d 100644
|
||||||
|
--- a/base/thirdparty/zlib/CMakeLists.txt
|
||||||
|
+++ b/base/thirdparty/zlib/CMakeLists.txt
|
||||||
|
@@ -52,7 +52,7 @@ set(ZLIB_MD5 "7d9fc1d78ae2fa3e84fe98b77d006c63")
|
||||||
|
ExternalProject_Add(
|
||||||
|
${PROJECT_NAME}
|
||||||
|
DOWNLOAD_DIR ${KO_DOWNLOAD_DIR}
|
||||||
|
- URL http://gentoo.osuosl.org/distfiles/zlib-${ZLIB_VER}.tar.xz
|
||||||
|
+ URL file://@zlib@
|
||||||
|
URL_MD5 ${ZLIB_MD5}
|
||||||
|
BUILD_IN_SOURCE 1
|
||||||
|
PATCH_COMMAND COMMAND ${PATCH_CMD1} COMMAND ${PATCH_CMD2} COMMAND ${PATCH_CMD3}
|
Loading…
Reference in New Issue
Block a user