biome: 1.9.2 -> 1.9.3
[NixPkgs.git] / pkgs / tools / text / invoice2data / default.nix
blobb2179d3f63b24487af23e47e0bcdb49b9abdc472
1 { lib
2 , fetchFromGitHub
3 , fetchpatch
4 , ghostscript
5 , imagemagick
6 , poppler_utils
7 , python3
8 , tesseract5
9 }:
11 python3.pkgs.buildPythonApplication rec {
12   pname = "invoice2data";
13   version = "0.4.4";
14   format = "setuptools";
16   src = fetchFromGitHub {
17     owner = "invoice-x";
18     repo = pname;
19     rev = "v${version}";
20     hash = "sha256-pAvkp8xkHYi/7ymbxaT7/Jhu44j2P8emm8GyXC6IBnI=";
21   };
23   patches = [
24     # https://github.com/invoice-x/invoice2data/pull/522
25     (fetchpatch {
26       name = "clean-up-build-dependencies.patch";
27       url = "https://github.com/invoice-x/invoice2data/commit/ccea3857c7c8295ca51dc24de6cde78774ea7e64.patch";
28       hash = "sha256-BhqPW4hWG/EaR3qBv5a68dcvIMrCCT74GdDHr0Mss5Q=";
29     })
30   ];
32   nativeBuildInputs = with python3.pkgs; [
33     setuptools-git
34   ];
36   propagatedBuildInputs = with python3.pkgs; [
37     dateparser
38     pdfminer-six
39     pillow
40     pyyaml
41     setuptools
42   ];
44   makeWrapperArgs = ["--prefix" "PATH" ":" (lib.makeBinPath [
45     ghostscript
46     imagemagick
47     tesseract5
48     poppler_utils
49   ])];
51   # Tests fails even when ran manually on my ubuntu machine !!
52   doCheck = false;
54   pythonImportsCheck = [
55     "invoice2data"
56   ];
58   meta = with lib; {
59     description = "Data extractor for PDF invoices";
60     mainProgram = "invoice2data";
61     homepage = "https://github.com/invoice-x/invoice2data";
62     license = licenses.mit;
63     maintainers = with maintainers; [ psyanticy ];
64   };