koreader-from-src: vendor zlib
This commit is contained in:
parent
29a4466750
commit
cc50ad172c
|
@ -15,10 +15,11 @@
|
|||
, luajit
|
||||
, sdcv
|
||||
, SDL2
|
||||
, substituteAll
|
||||
}:
|
||||
let
|
||||
luajit_lua52 = luajit.override { enable52Compat = true; };
|
||||
thirdparty = import ./sources.nix;
|
||||
sources = import ./sources.nix;
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "koreader-from-src";
|
||||
|
@ -38,7 +39,18 @@ stdenv.mkDerivation rec {
|
|||
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
|
||||
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";
|
||||
|
||||
|
@ -103,7 +115,7 @@ stdenv.mkDerivation rec {
|
|||
|
||||
'' + builtins.concatStringsSep "\n" (builtins.map
|
||||
(l: ''install_lib "${l.name}" "${l.rev}"'')
|
||||
thirdparty
|
||||
sources.thirdparty
|
||||
) + ''
|
||||
|
||||
make TARGET=debian DEBIAN=1 INSTALL_DIR="$out" SHELL=sh VERBOSE=1
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
[
|
||||
{
|
||||
thirdparty = [
|
||||
{
|
||||
url = "https://github.com/LuaJIT/LuaJIT";
|
||||
rev = "8635cbabf3094c4d8bd00578c7d812bea87bb2d3";
|
||||
|
@ -17,4 +18,12 @@
|
|||
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