diff --git a/pkgs/additional/koreader-from-src/default.nix b/pkgs/additional/koreader-from-src/default.nix index d680b560..396d8e37 100644 --- a/pkgs/additional/koreader-from-src/default.nix +++ b/pkgs/additional/koreader-from-src/default.nix @@ -172,6 +172,14 @@ let ]; }; + popen-noshell-src-ko = fetchFromGitHub { + owner = "famzah"; + repo = "popen-noshell"; + name = "popen-noshell"; + rev = "e715396a4951ee91c40a98d2824a130f158268bb"; + hash = "sha256-JeBZMsg6ZUGSnyZ4eds4w63gM/L73EsAnLaHOPpL6iM="; + }; + tesseract-src-ko = fetchFromGitHub { # TODO: try using nixpkgs' tesseract.src (i doubt it will work) owner = "tesseract-ocr"; @@ -181,6 +189,14 @@ let hash = "sha256-FQvlrJ+Uy7+wtUxBuS5NdoToUwNRhYw2ju8Ya8MLyQw="; }; + turbo-src-ko = fetchFromGitHub { + owner = "kernelsauce"; + repo = "turbo"; + name = "turbo"; + rev = "v2.1.3"; + hash = "sha256-vBRkFdc5a0FIt15HBz3TnqMZ+GGsqjEefnfJEpuVTBs="; + }; + # XXX: for some inscrutable reason, `enable52Compat` is *partially* broken, only when cross compiling. # `table.unpack` is non-nil, but `table.pack` is nil. # the normal path is for `enable52Compat` to set `env.NIX_CFLAGS_COMPILE = "-DLUAJIT_ENABLE_LUA52COMPAT";` @@ -375,9 +391,11 @@ let CRYPTO_LIB="${lib.getLib openssl}/lib/libcrypto.so" \ PNG_LIB="${lib.getLib libpng}/lib/libpng.so" \ PNG_DIR="${libAndDev libpng}" \ + POPEN_NOSHELL_DIR="$NIX_BUILD_TOP/popen-noshell" \ SQLITE_LIB="${lib.getLib sqlite}/lib/libsqlite3.so" \ SQLITE_DIR="${lib.getDev sqlite}" \ TESSERACT_DIR="$NIX_BUILD_TOP/tesseract" \ + TURBO_DIR="$NIX_BUILD_TOP/turbo" \ UTF8PROC_LIB="${lib.getLib utf8proc}/lib/libutf8proc.so" \ UTF8PROC_DIR="${utf8procAll}" \ ZLIB="${lib.getLib zlib}/lib/libz.so" \ @@ -447,7 +465,9 @@ stdenv.mkDerivation rec { lunasvg-src-ko minizip-src-ko mupdf-src-ko + popen-noshell-src-ko tesseract-src-ko + turbo-src-ko ] ++ (lib.mapAttrsToList (name: src: fetchgit ( { @@ -500,7 +520,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,minizip,mupdf,tesseract} + chmod -R u+w "$NIX_BUILD_TOP"/{fbink,kobo-usbms,leptonica,libk2pdfopt,lodepng,lunasvg,minizip,mupdf,popen-noshell,tesseract,turbo} # 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 @@ -572,6 +592,8 @@ stdenv.mkDerivation rec { skip_download lunasvg skip_download minizip skip_download mupdf + skip_download popen-noshell + skip_download turbo # outDir should match OUTPUT_DIR in koreader-base outDir="$NIX_BUILD_TOP/koreader/base/build/${stdenv.hostPlatform.config}" diff --git a/pkgs/additional/koreader-from-src/sources.nix b/pkgs/additional/koreader-from-src/sources.nix index 147c72eb..8dc48409 100644 --- a/pkgs/additional/koreader-from-src/sources.nix +++ b/pkgs/additional/koreader-from-src/sources.nix @@ -268,12 +268,12 @@ in # # TODO: i think we can use nixpkgs openssl, just lift lib/* up to the root of the package directory # # package = lib.getLib openssl_1_1; # N.B.: requires building with `NIXPKGS_ALLOW_INSECURE=1 nix build --impure ...` # }; - popen-noshell = { - source.url = "https://github.com/famzah/popen-noshell.git"; - source.rev = "e715396a4951ee91c40a98d2824a130f158268bb"; - source.hash = "sha256-JeBZMsg6ZUGSnyZ4eds4w63gM/L73EsAnLaHOPpL6iM="; - # package: not in nixpkgs - }; + # popen-noshell = { + # source.url = "https://github.com/famzah/popen-noshell.git"; + # source.rev = "e715396a4951ee91c40a98d2824a130f158268bb"; + # source.hash = "sha256-JeBZMsg6ZUGSnyZ4eds4w63gM/L73EsAnLaHOPpL6iM="; + # # package: not in nixpkgs + # }; # sdcv = { # # upstream is (temporarily?) acquiring this via `download_project` machinery # source.url = "https://github.com/Dushistov/sdcv.git"; @@ -287,12 +287,12 @@ in # source.hash = "sha256-FQvlrJ+Uy7+wtUxBuS5NdoToUwNRhYw2ju8Ya8MLyQw="; # # package = tesseract; # i guess koreader's k2pdf also builds tessearct?? # }; - turbo = { - source.url = "https://github.com/kernelsauce/turbo"; - source.rev = "tags/v2.1.3"; - source.hash = "sha256-vBRkFdc5a0FIt15HBz3TnqMZ+GGsqjEefnfJEpuVTBs="; - # package = turbo; # nixpkgs' turbo is a totally different thing - }; + # turbo = { + # source.url = "https://github.com/kernelsauce/turbo"; + # source.rev = "tags/v2.1.3"; + # source.hash = "sha256-vBRkFdc5a0FIt15HBz3TnqMZ+GGsqjEefnfJEpuVTBs="; + # # package = turbo; # nixpkgs' turbo is a totally different thing + # }; # utf8proc = { # source.url = "https://github.com/JuliaStrings/utf8proc.git"; # source.rev = "v2.9.0";