koreader: remove dead code/build inputs

This commit is contained in:
2024-02-04 22:01:26 +00:00
parent 7ac1ee66ad
commit 8afb6406a1
2 changed files with 1 additions and 79 deletions

View File

@@ -342,17 +342,10 @@ stdenv.mkDerivation rec {
automake
autoPatchelfHook # used by us, in fixupPhase, to ensure substituted thirdparty deps can be loaded at runtime
cmake # for koreader/base submodule
dpkg
gettext
git
libtool
makeWrapper
perl # TODO: openssl might try to take a runtime dep on this; see nixpkg
pkg-config
python3
ragel
which
# luajit_lua52.pkgs.luarocks
luaEnv.pkgs.luarocks
];
buildInputs = [
@@ -360,37 +353,7 @@ stdenv.mkDerivation rec {
luaEnv
];
postPatch =
let
env = "${buildPackages.coreutils}/bin/env";
in ''
${lib.optionalString false /* only needed if using the koreader vendored deps */ ''
substituteInPlace ../openssl/config --replace '/usr/bin/env' '${env}'
substituteInPlace ../openssl/Configure --replace '/usr/bin/env' '${env}'
chmod +x ../glib/gio/gio-querymodules-wrapper.py
chmod +x ../glib/gio/tests/gengiotypefuncs.py
chmod +x ../glib/gobject/tests/taptestrunner.py
# need directory write perm in order to patchShebangs
chmod u+w ../glib/{gio,gio/tests,glib,gobject/tests,tests}
patchShebangs ../glib/gio/data-to-c.py
patchShebangs ../glib/gio/gio-querymodules-wrapper.py
patchShebangs ../glib/gio/tests/gengiotypefuncs.py
patchShebangs ../glib/glib/update-gtranslit.py
patchShebangs ../glib/gobject/tests/taptestrunner.py
patchShebangs ../glib/tests/gen-casefold-txt.py
patchShebangs ../glib/tests/gen-casemap-txt.py
substituteInPlace ../glib/gio/gdbus-2.0/codegen/gdbus-codegen.in --replace '/usr/bin/env @PYTHON@' '@PYTHON@'
substituteInPlace ../glib/glib/gtester-report.in --replace '/usr/bin/env @PYTHON@' '@PYTHON@'
substituteInPlace ../glib/gobject/glib-genmarshal.in --replace '/usr/bin/env @PYTHON@' '@PYTHON@'
substituteInPlace ../glib/gobject/glib-mkenums.in --replace '/usr/bin/env @PYTHON@' '@PYTHON@'
substituteInPlace ../harfbuzz/autogen.sh --replace 'which pkg-config' 'which $PKG_CONFIG'
substituteInPlace ../fribidi/autogen.sh --replace 'which pkg-config' 'which $PKG_CONFIG'
''}
postPatch = ''
# patch for newer openssl
substituteInPlace --fail base/ffi/crypto.lua \
--replace 'ffi.load("libs/libcrypto.so.1.1")' 'ffi.load("libcrypto.so")'

View File

@@ -304,45 +304,4 @@ in
# package = zsync; # possibly a different thing than koreader's
# };
};
externalProjects = {
# dropbear = {
# url = "http://deb.debian.org/debian/pool/main/d/dropbear/dropbear_2018.76.orig.tar.bz2";
# hash = "sha256-8vuRZ+yoz5NFal/B1Pr3CZAqOrcN1E41LzrLw//a6mU=";
# };
# gettext = {
# url = "http://ftpmirror.gnu.org/gettext/gettext-0.21.tar.gz";
# hash = "sha256-x30NoxAq7JwH9DZx5gYR6/+JqZbvFZSXzo5Z0HV4axI=";
# };
# libiconv = {
# url = "http://ftpmirror.gnu.org/libiconv/libiconv-1.15.tar.gz";
# hash = "sha256-zPU2YgpFRY0muoOIepg7loJwAekqE4R7ReSSXMiRMXg=";
# };
# lpeg = {
# url = "http://distcache.FreeBSD.org/ports-distfiles/lpeg-1.0.2.tar.gz";
# hash = "sha256-SNZldgUbbHg4j6rQm3BJMJMmRYj80PJY3aqxzdShX/4=";
# };
# sdcv = {
# # TODO: if this form of substitution works, i could optionally patch in *all* deps
# # using the `file://@foo@` ExternalProject_Add syntax
# url = "https://github.com/Dushistov/sdcv/archive/v0.5.5.tar.gz";
# hash = "sha256-TSUZ6PhHm5MB3JHpzaPh7v7xmXDs4OjAXwx7et5dyUs=";
# };
sdl2 = {
url = "https://github.com/libsdl-org/SDL/releases/download/release-2.28.1/SDL2-2.28.1.tar.gz";
hash = "sha256-SXfOulwAVNvmwvEUZBrO1DzjvytB6mS2o3LWuhKcsV0=";
};
# sqlite = {
# url = "https://www.sqlite.org/2023/sqlite-autoconf-3440200.tar.gz";
# hash = "sha256-HGcZoUi8Qc8PK7vjkm184/XKCdh48SRvzCB2exdbtAc=";
# };
# tar = {
# url = "http://ftpmirror.gnu.org/tar/tar-1.34.tar.gz";
# hash = "sha256-A9kIz1doz+a3rViMkhxu0hrKv7K3m3iNEzBFNQdkeu0=";
# };
# zlib = {
# url = "https://github.com/madler/zlib/releases/download/v1.2.13/zlib-1.2.13.tar.xz";
# hash = "sha256-0Uw44xOvw1qah2Da3yYEL1HqD10VSwYwox2gVAEH+5g=";
# };
};
}