nixpkgs/pkgs/by-name/in/invoice2data/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

72 lines
1.4 KiB
Nix
Raw Normal View History

2021-11-21 12:52:07 +00:00
{
lib,
fetchFromGitHub,
fetchpatch,
ghostscript,
2021-11-21 12:52:07 +00:00
imagemagick,
poppler_utils,
2021-11-21 12:52:07 +00:00
python3,
tesseract5,
2021-11-21 12:52:07 +00:00
}:
2018-05-30 12:58:34 +00:00
2021-11-21 12:52:07 +00:00
python3.pkgs.buildPythonApplication rec {
2018-05-30 12:58:34 +00:00
pname = "invoice2data";
2023-11-15 07:45:04 +00:00
version = "0.4.4";
2021-11-21 12:52:07 +00:00
format = "setuptools";
2018-05-30 12:58:34 +00:00
2021-11-21 12:52:07 +00:00
src = fetchFromGitHub {
owner = "invoice-x";
repo = pname;
rev = "v${version}";
2023-11-15 07:45:04 +00:00
hash = "sha256-pAvkp8xkHYi/7ymbxaT7/Jhu44j2P8emm8GyXC6IBnI=";
2018-05-30 12:58:34 +00:00
};
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=";
})
];
nativeBuildInputs = with python3.pkgs; [
setuptools-git
];
2018-05-30 12:58:34 +00:00
2021-11-21 12:52:07 +00:00
propagatedBuildInputs = with python3.pkgs; [
dateparser
pdfminer-six
2021-11-21 12:52:07 +00:00
pillow
pyyaml
setuptools
2021-11-21 12:52:07 +00:00
];
makeWrapperArgs = [
"--prefix"
"PATH"
":"
(lib.makeBinPath [
ghostscript
2021-11-21 12:52:07 +00:00
imagemagick
tesseract5
poppler_utils
2021-11-21 12:52:07 +00:00
])
];
2018-05-30 12:58:34 +00:00
# Tests fails even when ran manually on my ubuntu machine !!
doCheck = false;
2021-11-21 12:52:07 +00:00
pythonImportsCheck = [
"invoice2data"
];
meta = with lib; {
2018-05-30 12:58:34 +00:00
description = "Data extractor for PDF invoices";
mainProgram = "invoice2data";
homepage = "https://github.com/invoice-x/invoice2data";
2018-05-30 12:58:34 +00:00
license = licenses.mit;
maintainers = with maintainers; [ psyanticy ];
};
}