Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ledger-autosync: fix build with Python 3.12 and don't propagate ledger and hledger #334202

Merged
merged 4 commits into from
Aug 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 0 additions & 67 deletions pkgs/applications/office/ledger-autosync/default.nix

This file was deleted.

64 changes: 64 additions & 0 deletions pkgs/by-name/le/ledger-autosync/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{
lib,
python3Packages,
fetchFromGitHub,
fetchpatch2,
ledger,
hledger,
}:

python3Packages.buildPythonApplication rec {
pname = "ledger-autosync";
version = "1.0.3";
pyproject = true;

# no tests included in PyPI tarball
src = fetchFromGitHub {
owner = "egh";
repo = "ledger-autosync";
rev = "v${version}";
hash = "sha256-IuOlVJEjNqRPfV4q/Zy3UQe5iMwDlnSV356FrTsmflg=";
};

patches = [
(fetchpatch2 {
name = "drop-distutils.patch";
url = "https://github.com/egh/ledger-autosync/commit/b7a2a185b9c3b17764322dcc80153410d12e6a5f.patch";
hash = "sha256-qKuTpsNFuS00yRAH4VGpMA249ml0BGZsGVb75WrBWEo=";
})
(fetchpatch2 {
name = "drop-imp.patch";
url = "https://github.com/egh/ledger-autosync/commit/453d92ad279e6c90fadf835d1c39189a1179eb17.patch";
hash = "sha256-mncMvdWldAnVDy1+bJ+oyDOrUb14v9LrBRz/CYrtYbc=";
})
];

build-system = with python3Packages; [ poetry-core ];

dependencies = with python3Packages; [
ofxclient
ofxparse
];

nativeCheckInputs = [
hledger
ledger
python3Packages.ledger
python3Packages.pytestCheckHook
];

# Disable some non-passing tests:
# https://github.com/egh/ledger-autosync/issues/127
disabledTests = [
"test_payee_match"
"test_args_only"
];

meta = with lib; {
homepage = "https://github.com/egh/ledger-autosync";
changelog = "https://github.com/egh/ledger-autosync/releases/tag/v${version}";
description = "OFX/CSV autosync for ledger and hledger";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ eamsden ];
};
}
2 changes: 0 additions & 2 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -31696,8 +31696,6 @@ with pkgs;
inherit (darwin.apple_sdk.frameworks) Foundation;
};

ledger-autosync = callPackage ../applications/office/ledger-autosync { };

ledger-web = callPackage ../applications/office/ledger-web { };

ledger2beancount = callPackage ../tools/text/ledger2beancount { };
Expand Down