k2pdfopt: set env var to find OCR language files
This commit is contained in:
parent
8bdcaa713d
commit
5f29d7e9a5
@ -1,5 +1,5 @@
|
|||||||
{ stdenv, runCommand, fetchzip, fetchurl, fetchpatch, fetchFromGitHub
|
{ stdenv, runCommand, fetchzip, fetchurl, fetchpatch, fetchFromGitHub
|
||||||
, cmake, pkgconfig, zlib, libpng
|
, cmake, pkgconfig, zlib, libpng, makeWrapper
|
||||||
, enableGSL ? true, gsl
|
, enableGSL ? true, gsl
|
||||||
, enableGhostScript ? true, ghostscript
|
, enableGhostScript ? true, ghostscript
|
||||||
, enableMuPDF ? true, mupdf
|
, enableMuPDF ? true, mupdf
|
||||||
@ -71,7 +71,7 @@ in stdenv.mkDerivation rec {
|
|||||||
--replace "<djvu.h>" "<libdjvu/ddjvuapi.h>"
|
--replace "<djvu.h>" "<libdjvu/ddjvuapi.h>"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake pkgconfig ];
|
nativeBuildInputs = [ cmake pkgconfig makeWrapper ];
|
||||||
|
|
||||||
buildInputs =
|
buildInputs =
|
||||||
let
|
let
|
||||||
@ -159,6 +159,10 @@ in stdenv.mkDerivation rec {
|
|||||||
install -D -m 755 k2pdfopt $out/bin/k2pdfopt
|
install -D -m 755 k2pdfopt $out/bin/k2pdfopt
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
preFixup = optionalString enableTesseract ''
|
||||||
|
wrapProgram $out/bin/k2pdfopt --set-default TESSDATA_PREFIX ${tesseract4}/share/tessdata
|
||||||
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "Optimizes PDF/DJVU files for mobile e-readers (e.g. the Kindle) and smartphones";
|
description = "Optimizes PDF/DJVU files for mobile e-readers (e.g. the Kindle) and smartphones";
|
||||||
homepage = "http://www.willus.com/k2pdfopt";
|
homepage = "http://www.willus.com/k2pdfopt";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user