linux/hardened/patches/6.6: v6.6.73-hardened1 -> v6.6.75-hardened1
[NixPkgs.git] / pkgs / by-name / in / invoice2data / package.nix
blob3280b1fab236384e081eee02926a6901a141766b
2   lib,
3   fetchFromGitHub,
4   fetchpatch,
5   ghostscript,
6   imagemagick,
7   poppler_utils,
8   python3,
9   tesseract5,
12 python3.pkgs.buildPythonApplication rec {
13   pname = "invoice2data";
14   version = "0.4.4";
15   format = "setuptools";
17   src = fetchFromGitHub {
18     owner = "invoice-x";
19     repo = pname;
20     rev = "v${version}";
21     hash = "sha256-pAvkp8xkHYi/7ymbxaT7/Jhu44j2P8emm8GyXC6IBnI=";
22   };
24   patches = [
25     # https://github.com/invoice-x/invoice2data/pull/522
26     (fetchpatch {
27       name = "clean-up-build-dependencies.patch";
28       url = "https://github.com/invoice-x/invoice2data/commit/ccea3857c7c8295ca51dc24de6cde78774ea7e64.patch";
29       hash = "sha256-BhqPW4hWG/EaR3qBv5a68dcvIMrCCT74GdDHr0Mss5Q=";
30     })
31   ];
33   nativeBuildInputs = with python3.pkgs; [
34     setuptools-git
35   ];
37   propagatedBuildInputs = with python3.pkgs; [
38     dateparser
39     pdfminer-six
40     pillow
41     pyyaml
42     setuptools
43   ];
45   makeWrapperArgs = [
46     "--prefix"
47     "PATH"
48     ":"
49     (lib.makeBinPath [
50       ghostscript
51       imagemagick
52       tesseract5
53       poppler_utils
54     ])
55   ];
57   # Tests fails even when ran manually on my ubuntu machine !!
58   doCheck = false;
60   pythonImportsCheck = [
61     "invoice2data"
62   ];
64   meta = with lib; {
65     description = "Data extractor for PDF invoices";
66     mainProgram = "invoice2data";
67     homepage = "https://github.com/invoice-x/invoice2data";
68     license = licenses.mit;
69     maintainers = with maintainers; [ psyanticy ];
70   };