2021-06-26 14:16:18 +01:00
|
|
|
{ lib
|
|
|
|
, python3Packages
|
|
|
|
, fetchFromGitHub
|
|
|
|
, ledger
|
|
|
|
, hledger
|
|
|
|
, useLedger ? true
|
|
|
|
, useHledger ? true
|
|
|
|
}:
|
2019-01-03 02:45:51 +00:00
|
|
|
|
|
|
|
python3Packages.buildPythonApplication rec {
|
|
|
|
pname = "ledger-autosync";
|
2021-06-26 14:50:41 +01:00
|
|
|
version = "1.0.3";
|
|
|
|
format = "pyproject";
|
2019-01-03 02:45:51 +00:00
|
|
|
|
2021-05-02 09:42:55 +01:00
|
|
|
# no tests included in PyPI tarball
|
2019-01-03 02:45:51 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "egh";
|
|
|
|
repo = "ledger-autosync";
|
2021-06-26 14:50:41 +01:00
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "0n3y4qxsv1cyvyap95h3rj4bj1sinyfgsajygm7s8di3j5aabqr2";
|
2019-01-03 02:45:51 +00:00
|
|
|
};
|
|
|
|
|
2021-06-26 14:50:41 +01:00
|
|
|
nativeBuildInputs = with python3Packages; [
|
|
|
|
poetry-core
|
2021-05-02 09:42:55 +01:00
|
|
|
];
|
|
|
|
|
2019-01-03 02:45:51 +00:00
|
|
|
propagatedBuildInputs = with python3Packages; [
|
|
|
|
asn1crypto
|
|
|
|
beautifulsoup4
|
|
|
|
cffi
|
|
|
|
cryptography
|
|
|
|
entrypoints
|
|
|
|
fuzzywuzzy
|
|
|
|
idna
|
|
|
|
jeepney
|
|
|
|
keyring
|
|
|
|
lxml
|
|
|
|
mock
|
|
|
|
nose
|
|
|
|
ofxclient
|
|
|
|
ofxhome
|
|
|
|
ofxparse
|
|
|
|
pbr
|
|
|
|
pycparser
|
|
|
|
secretstorage
|
|
|
|
six
|
2021-01-15 05:42:41 +00:00
|
|
|
] ++ lib.optional useLedger ledger
|
|
|
|
++ lib.optional useHledger hledger;
|
2019-01-03 02:45:51 +00:00
|
|
|
|
|
|
|
# Checks require ledger as a python package,
|
|
|
|
# ledger does not support python3 while ledger-autosync requires it.
|
2021-06-26 14:50:41 +01:00
|
|
|
checkInputs = with python3Packages; [ ledger hledger nose mock pytestCheckHook ];
|
|
|
|
|
|
|
|
# Disable some non-passing tests:
|
|
|
|
# https://github.com/egh/ledger-autosync/issues/127
|
|
|
|
disabledTests = [
|
|
|
|
"test_payee_match"
|
|
|
|
"test_args_only"
|
|
|
|
];
|
2019-01-03 02:45:51 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/egh/ledger-autosync";
|
2019-01-03 02:45:51 +00:00
|
|
|
description = "OFX/CSV autosync for ledger and hledger";
|
|
|
|
license = licenses.gpl3;
|
|
|
|
maintainers = with maintainers; [ eamsden ];
|
|
|
|
};
|
|
|
|
}
|