Files
nixpkgs/pkgs/by-name/oc/ocrodjvu/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

75 lines
1.5 KiB
Nix

{
lib,
python3Packages,
fetchFromGitHub,
djvulibre,
docbook-xsl-ns,
glibcLocales,
libxml2,
libxml2Python,
libxslt,
pkg-config,
tesseract5,
withCuneiform ? false,
cuneiform,
withGocr ? false,
gocr,
withOcrad ? false,
ocrad,
}:
python3Packages.buildPythonApplication rec {
pname = "ocrodjvu";
version = "0.14";
pyproject = true;
src = fetchFromGitHub {
owner = "FriedrichFroebel";
repo = "ocrodjvu";
tag = version;
hash = "sha256-/TPo8YCE8JKKKBBeV12ilgTNDmuklwfy0TPI/7dBiOs=";
};
build-system = with python3Packages; [
setuptools
];
propagatedBuildInputs = [
]
++ lib.optional withCuneiform cuneiform
++ lib.optional withGocr gocr
++ lib.optional withOcrad ocrad;
dependencies = with python3Packages; [
lxml
python-djvulibre
pyicu
html5lib
];
nativeCheckInputs = [
python3Packages.unittestCheckHook
python3Packages.pillow
djvulibre
glibcLocales
libxml2
libxml2Python
tesseract5
];
unittestFlagsArray = [
"tests"
"-v"
];
meta = {
description = "Wrapper for OCR systems that allows you to perform OCR on DjVu files";
homepage = "https://github.com/FriedrichFroebel/ocrodjvu";
changelog = "https://github.com/FriedrichFroebel/ocrodjvu/blob/${version}/doc/changelog";
license = lib.licenses.gpl2Only;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [ dansbandit ];
mainProgram = "ocrodjvu";
};
}