Files
nixpkgs/pkgs/by-name/in/invoice2data/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

73 lines
1.5 KiB
Nix

{
lib,
fetchFromGitHub,
fetchpatch,
ghostscript,
imagemagick,
poppler-utils,
python3,
tesseract5,
}:
python3.pkgs.buildPythonApplication rec {
pname = "invoice2data";
version = "0.4.4";
format = "pyproject";
src = fetchFromGitHub {
owner = "invoice-x";
repo = "invoice2data";
rev = "v${version}";
hash = "sha256-pAvkp8xkHYi/7ymbxaT7/Jhu44j2P8emm8GyXC6IBnI=";
};
patches = [
# https://github.com/invoice-x/invoice2data/pull/522
(fetchpatch {
name = "clean-up-build-dependencies.patch";
url = "https://github.com/invoice-x/invoice2data/commit/ccea3857c7c8295ca51dc24de6cde78774ea7e64.patch";
hash = "sha256-BhqPW4hWG/EaR3qBv5a68dcvIMrCCT74GdDHr0Mss5Q=";
})
];
build-system = with python3.pkgs; [
setuptools
setuptools-git
];
dependencies = with python3.pkgs; [
dateparser
pdfminer-six
pillow
pyyaml
setuptools # pkg_resources is imported during runtime
];
makeWrapperArgs = [
"--prefix"
"PATH"
":"
(lib.makeBinPath [
ghostscript
imagemagick
tesseract5
poppler-utils
])
];
# Tests fails even when ran manually on my ubuntu machine !!
doCheck = false;
pythonImportsCheck = [
"invoice2data"
];
meta = with lib; {
description = "Data extractor for PDF invoices";
mainProgram = "invoice2data";
homepage = "https://github.com/invoice-x/invoice2data";
license = licenses.mit;
maintainers = with maintainers; [ psyanticy ];
};
}