diff --git a/pkgs/misc/capture2text/default.nix b/pkgs/misc/capture2text/default.nix
index 9c45a522632741f1ee4f4a8884b330d571305b31..5e7d4853b80160b5a193de4bb2b21228d21dcd4c 100644
--- a/pkgs/misc/capture2text/default.nix
+++ b/pkgs/misc/capture2text/default.nix
@@ -15,12 +15,22 @@ --replace "QMAKE_CXXFLAGS" "#QMAKE_CXXFLAGS" \
--replace "-lpvt.cppan.demo.danbloomberg.leptonica-1.74.4" "-llept" \
--replace "-luser32" "-ltesseract"
substituteInPlace CommandLine.cpp \
--replace "Capture2Text_CLI.exe" "capture2text"
--replace "QCoreApplication::applicationDirPath()" \
"QStandardPaths::writableLocation(QStandardPaths::AppDataLocation)" \
--replace "exeDirpath.toLocal8Bit().constData()" "NULL"
# See https://github.com/DanBloomberg/leptonica/commit/990a76de210636dfc4c976c7d3c6d63500e363b9
substituteInPlace PreProcess.cpp \
--replace "pixAverageInRect(binarizeForNegPixs, &negRect, &pixelAvg)" "pixAverageInRect(binarizeForNegPixs, NULL, &negRect, 0, 255, 1, &pixelAvg)"
--replace "pixAverageInRect(binarizeForNegPixs, &negRect, &pixelAvg)" \
"pixAverageInRect(binarizeForNegPixs, NULL, &negRect, 0, 255, 1, &pixelAvg)"
'';
buildInputs = [ leptonica tesseract4 ];
application/octet-stream
This content has been proxied by September (3851b).