diff options
author | Jonathan Ringer <jonringer117@gmail.com> | 2021-11-21 14:40:40 -0800 |
---|---|---|
committer | Jonathan Ringer <jonringer117@gmail.com> | 2021-11-21 14:40:40 -0800 |
commit | 09e494f4c296b29755fb8639e3f751f6aa706a45 (patch) | |
tree | 1f1ff77e46b78c8d91808fef8405361366867dd4 /pkgs/tools/text/invoice2data/default.nix | |
parent | 6b8044795e4b7ff99b96259a4a6b09eb9380703d (diff) | |
parent | b2181bc967053310657128d687e44ec683e7604b (diff) |
Merge remote-tracking branch 'origin/master' into staging-next
Conflicts:
pkgs/applications/window-managers/sway/default.nix
Diffstat (limited to 'pkgs/tools/text/invoice2data/default.nix')
-rw-r--r-- | pkgs/tools/text/invoice2data/default.nix | 49 |
1 files changed, 41 insertions, 8 deletions
diff --git a/pkgs/tools/text/invoice2data/default.nix b/pkgs/tools/text/invoice2data/default.nix index 8007724f4a53..941f2d6f4938 100644 --- a/pkgs/tools/text/invoice2data/default.nix +++ b/pkgs/tools/text/invoice2data/default.nix @@ -1,21 +1,54 @@ -{ lib, python3Packages, xpdf, imagemagick, tesseract }: +{ lib +, fetchFromGitHub +, imagemagick +, python3 +, tesseract +, xpdf +}: -python3Packages.buildPythonPackage rec { +python3.pkgs.buildPythonApplication rec { pname = "invoice2data"; - version = "0.2.93"; + version = "0.3.6"; + format = "setuptools"; - src = python3Packages.fetchPypi { - inherit pname version; - sha256 = "1phz0a8jxg074k0im7shrrdfvdps7bn1fa4zwcf8q3sa2iig26l4"; + src = fetchFromGitHub { + owner = "invoice-x"; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-t1jgLyKtQsLINlnkCdSbVfTM6B/EiD1yGtx9UHjyZVE="; }; - makeWrapperArgs = ["--prefix" "PATH" ":" (lib.makeBinPath [ imagemagick xpdf tesseract ]) ]; + nativeBuildInputs = with python3.pkgs; [ + setuptools-git + ]; - propagatedBuildInputs = with python3Packages; [ unidecode dateparser pyyaml pillow chardet pdfminer ]; + propagatedBuildInputs = with python3.pkgs; [ + chardet + dateparser + pdfminer + pillow + pyyaml + unidecode + ]; + + postPatch = '' + substituteInPlace setup.cfg \ + --replace "pytest-runner" "" + ''; + + makeWrapperArgs = ["--prefix" "PATH" ":" (lib.makeBinPath [ + imagemagick + tesseract + xpdf + ])]; # Tests fails even when ran manually on my ubuntu machine !! doCheck = false; + pythonImportsCheck = [ + "invoice2data" + ]; + meta = with lib; { description = "Data extractor for PDF invoices"; homepage = "https://github.com/invoice-x/invoice2data"; |