From 7ac1ee66ad2b938d2c9f887578cd1ea93597b26b Mon Sep 17 00:00:00 2001 From: Colin Date: Sun, 4 Feb 2024 21:05:36 +0000 Subject: [PATCH] koreader: use nixpkgs' luasocket and luasec --- pkgs/additional/koreader-from-src/default.nix | 6 +++++ pkgs/additional/koreader-from-src/sources.nix | 24 +++++++++---------- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/pkgs/additional/koreader-from-src/default.nix b/pkgs/additional/koreader-from-src/default.nix index e723baf3..3e958d3d 100644 --- a/pkgs/additional/koreader-from-src/default.nix +++ b/pkgs/additional/koreader-from-src/default.nix @@ -117,6 +117,8 @@ let propagatedBuildInputs = [ lpeg ]; }) lpeg + luasec + luasocket rapidjson ]); rockspecFor = luaPkgName: let @@ -240,6 +242,8 @@ let LUAJIT="${luaEnv}/bin/luajit" \ LUAJIT_JIT="${luaEnv}/share/lua/5.1/jit" \ LUAJIT_LIB="${lib.getLib luaEnv}/lib/libluajit-5.1.so" \ + LUASEC="${luaEnv}/share/lua/5.1/ssl/" \ + LUASOCKET="${luaEnv}/share/lua/5.1/socket/" \ LUA_INCDIR="${lib.getDev luaEnv}/include" \ LUA_LIBDIR="${lib.getLib luaEnv}/lib/libluajit-5.1.so" \ LUA_RAPIDJSON_ROCK="${rockspecFor "rapidjson"}" \ @@ -420,6 +424,8 @@ stdenv.mkDerivation rec { --replace-warn '$(THIRDPARTY_DIR)/lpeg/*.*' "" \ --replace-warn '$(THIRDPARTY_DIR)/lua-rapidjson/*.*' "" \ --replace-warn '$(THIRDPARTY_DIR)/luajit/*.*' "" \ + --replace-warn '$(THIRDPARTY_DIR)/luasec/*.*' "" \ + --replace-warn '$(THIRDPARTY_DIR)/luasocket/*.*' "" \ --replace-warn '$(THIRDPARTY_DIR)/openssh/*.*' "" \ --replace-warn '$(THIRDPARTY_DIR)/openssl/*.*' "" \ --replace-warn '$(THIRDPARTY_DIR)/sdcv/*.*' "" \ diff --git a/pkgs/additional/koreader-from-src/sources.nix b/pkgs/additional/koreader-from-src/sources.nix index 50530722..63f65ce1 100644 --- a/pkgs/additional/koreader-from-src/sources.nix +++ b/pkgs/additional/koreader-from-src/sources.nix @@ -198,18 +198,18 @@ in # source.hash = "sha256-y/czEVPtCt4uN1n49Qi7BrgZmkG+SDXlM5D2GvvO2qg="; # # package: TODO: packaged in nix as a luarocks package # }; - luasec = { - source.url = "https://github.com/brunoos/luasec"; - source.rev = "tags/v1.3.1"; - source.hash = "sha256-3iYRNQoVk5HFjDSqRRmg1taSqeT2cHFil36vxjrEofo="; - # package: TODO: packaged in nix as a luarocks package - }; - luasocket = { - source.url = "https://github.com/lunarmodules/luasocket"; - source.rev = "8c2ff7217e2a205eb107a6f48b04ff1b2b3090a1"; - source.hash = "sha256-Y35QYNLznQmErr6rIjxLzw0/6Y7y8TbzD4yaEdgEljA="; - # package: TODO: packaged in nix as a luarocks package - }; + # luasec = { + # source.url = "https://github.com/brunoos/luasec"; + # source.rev = "tags/v1.3.1"; + # source.hash = "sha256-3iYRNQoVk5HFjDSqRRmg1taSqeT2cHFil36vxjrEofo="; + # # package: TODO: packaged in nix as a luarocks package + # }; + # luasocket = { + # source.url = "https://github.com/lunarmodules/luasocket"; + # source.rev = "8c2ff7217e2a205eb107a6f48b04ff1b2b3090a1"; + # source.hash = "sha256-Y35QYNLznQmErr6rIjxLzw0/6Y7y8TbzD4yaEdgEljA="; + # # package: TODO: packaged in nix as a luarocks package + # }; lua-Spore = { # Complete... ish? # this originally failed like so: