summary refs log tree commit diff
path: root/pkgs/applications/office
diff options
context:
space:
mode:
authorDamien Cassou <damien@cassou.me>2021-06-26 15:50:41 +0200
committerDamien Cassou <damien@cassou.me>2021-06-26 18:40:04 +0200
commitfe090d4c1348565c804bb8fc61c03dba25238056 (patch)
tree1f870bba1b11c2a371a520c7a958c56695f320ea /pkgs/applications/office
parent37635624cf506a5299095ad39dcd7eca661ea70a (diff)
downloadnixpkgs-fe090d4c1348565c804bb8fc61c03dba25238056.tar
nixpkgs-fe090d4c1348565c804bb8fc61c03dba25238056.tar.gz
nixpkgs-fe090d4c1348565c804bb8fc61c03dba25238056.tar.bz2
nixpkgs-fe090d4c1348565c804bb8fc61c03dba25238056.tar.lz
nixpkgs-fe090d4c1348565c804bb8fc61c03dba25238056.tar.xz
nixpkgs-fe090d4c1348565c804bb8fc61c03dba25238056.tar.zst
nixpkgs-fe090d4c1348565c804bb8fc61c03dba25238056.zip
ledger-autosync: unstable-2021-04-01 -> 1.0.3
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
Diffstat (limited to 'pkgs/applications/office')
-rw-r--r--pkgs/applications/office/ledger-autosync/default.nix27
-rw-r--r--pkgs/applications/office/ledger-autosync/fix-ofxparse-dependency.patch13
2 files changed, 14 insertions, 26 deletions
diff --git a/pkgs/applications/office/ledger-autosync/default.nix b/pkgs/applications/office/ledger-autosync/default.nix
index 47faeeccc14..4f992c3ebe9 100644
--- a/pkgs/applications/office/ledger-autosync/default.nix
+++ b/pkgs/applications/office/ledger-autosync/default.nix
@@ -9,22 +9,19 @@
 
 python3Packages.buildPythonApplication rec {
   pname = "ledger-autosync";
-  version = "unstable-2021-04-01";
+  version = "1.0.3";
+  format = "pyproject";
 
   # no tests included in PyPI tarball
   src = fetchFromGitHub {
     owner = "egh";
     repo = "ledger-autosync";
-    rev = "0b674c57c833f75b1a36d8caf78e1567c8e2180c";
-    sha256 = "0q404gr85caib5hg83cnmgx4684l72w9slxyxrwsiwhlf7gm443q";
+    rev = "v${version}";
+    sha256 = "0n3y4qxsv1cyvyap95h3rj4bj1sinyfgsajygm7s8di3j5aabqr2";
   };
 
-  patches = [
-    # ledger-autosync specifies an URL for its ofxparse
-    # dependency. This patch removes the URL to only use the
-    # `ofxparse` name. This works because nixpkgs' version of ofxparse
-    # is more recent than the latest release.
-    ./fix-ofxparse-dependency.patch
+  nativeBuildInputs = with python3Packages; [
+    poetry-core
   ];
 
   propagatedBuildInputs = with python3Packages; [
@@ -52,10 +49,14 @@ python3Packages.buildPythonApplication rec {
 
   # 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
-  '';
+  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"
+  ];
 
   meta = with lib; {
     homepage = "https://github.com/egh/ledger-autosync";
diff --git a/pkgs/applications/office/ledger-autosync/fix-ofxparse-dependency.patch b/pkgs/applications/office/ledger-autosync/fix-ofxparse-dependency.patch
deleted file mode 100644
index cb12ba9f335..00000000000
--- a/pkgs/applications/office/ledger-autosync/fix-ofxparse-dependency.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/setup.py b/setup.py
-index eda6db5..ed6b90b 100644
---- a/setup.py
-+++ b/setup.py
-@@ -38,7 +38,7 @@ setup(
-     install_requires=[
-         'setuptools>=26',
-         'ofxclient',
--        "ofxparse @ https://github.com/jseutter/ofxparse/tarball/3236cfd96434feb6bc79a8b66f3400f18e2ad3c4"
-+        'ofxparse'
-     ],
- 
-     extras_require={
\ No newline at end of file