mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-04 05:50:00 +00:00
72 lines
1.6 KiB
Nix
72 lines
1.6 KiB
Nix
{
|
|
lib,
|
|
python3Packages,
|
|
fetchFromGitHub,
|
|
}:
|
|
python3Packages.buildPythonApplication (finalAttrs: {
|
|
pname = "owocr";
|
|
version = "1.26.8";
|
|
pyproject = true;
|
|
__structuredAttrs = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "AuroraWright";
|
|
repo = "owocr";
|
|
tag = finalAttrs.version;
|
|
hash = "sha256-bdkhuEH2OJspJ9gBmQQAzCimN1Iuj5D6Cdzr0dO0HEc=";
|
|
};
|
|
|
|
# we use pystray directly to avoid making a new package
|
|
# that only carries a single patch for windows double click support.
|
|
# pythonRelaxDeps was not successful in patching
|
|
postPatch = ''
|
|
substituteInPlace pyproject.toml \
|
|
--replace-fail "pystrayfix>=0.19.8" "pystray"
|
|
'';
|
|
|
|
build-system = [ python3Packages.setuptools ];
|
|
|
|
dependencies = with python3Packages; [
|
|
fire
|
|
jaconv
|
|
loguru
|
|
numpy
|
|
pillow
|
|
pyperclipfix
|
|
pynput
|
|
websockets
|
|
desktop-notifier
|
|
mss
|
|
pysbd
|
|
langid
|
|
psutil
|
|
pywinctl
|
|
# extra optional libs for OCR engines
|
|
azure-ai-vision-imageanalysis
|
|
easyocr
|
|
pyjson5 # Google Lens
|
|
google-cloud-vision
|
|
manga-ocr
|
|
rapidocr
|
|
requests # winRT OCR
|
|
python3Packages.obsws-python
|
|
python3Packages.pystray
|
|
python3Packages.pynputfix
|
|
curl-cffi
|
|
pygobject3
|
|
dbus-python
|
|
pywayland
|
|
];
|
|
|
|
doCheck = false; # no tests
|
|
|
|
meta = {
|
|
description = "Optical character recognition for Japanese text";
|
|
homepage = "https://github.com/AuroraWright/owocr";
|
|
changelog = "https://github.com/AuroraWright/owocr/releases/tag/${finalAttrs.src.tag}";
|
|
license = lib.licenses.gpl3Only;
|
|
maintainers = with lib.maintainers; [ sigmanificient ];
|
|
mainProgram = "owocr";
|
|
};
|
|
})
|