2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, python3Packages, fetchFromGitHub, ledger, hledger, useLedger ? true, useHledger ? true }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
python3Packages.buildPythonApplication rec {
|
|
|
|
pname = "ledger-autosync";
|
2020-05-03 17:38:23 +00:00
|
|
|
version = "1.0.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# no tests included in PyPI tarball
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "egh";
|
|
|
|
repo = "ledger-autosync";
|
|
|
|
rev = "v${version}";
|
2020-05-03 17:38:23 +00:00
|
|
|
sha256 = "0sh32jcf8iznnbg1kqlrswbzfmn4h3gkw32q20xwxzz4935pz1qk";
|
2020-04-24 23:36:52 +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 22:18:51 +00:00
|
|
|
] ++ lib.optional useLedger ledger
|
|
|
|
++ lib.optional useHledger hledger;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# Checks require ledger as a python package,
|
|
|
|
# ledger does not support python3 while ledger-autosync requires it.
|
|
|
|
checkInputs = with python3Packages; [ ledger hledger nose mock ];
|
|
|
|
checkPhase = ''
|
|
|
|
nosetests -a generic -a ledger -a hledger
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/egh/ledger-autosync";
|
|
|
|
description = "OFX/CSV autosync for ledger and hledger";
|
|
|
|
license = licenses.gpl3;
|
|
|
|
maintainers = with maintainers; [ eamsden ];
|
|
|
|
};
|
|
|
|
}
|