commit 83f9fd6f7e0e6417972014eab61a421416fd8545
parent 26f150e463f52e301da6b016ed9dcee5a2bf27e8
Author: Nikolay Korotkiy <sikmir@disroot.org>
Date: Fri, 27 Oct 2023 01:02:37 +0400
tatoebatools: fix build
Diffstat:
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/pkgs/linguistics/tatoebatools/cli.patch b/pkgs/linguistics/tatoebatools/cli.patch
@@ -11,7 +11,7 @@ index 10ad3c2..4cf6338 100644
"requests>=2.23.0",
"SQLAlchemy==1.4.23",
"tqdm>=4.46.0",
-+ "xdg",
++ "xdg-base-dirs",
],
+ entry_points={"console_scripts": "parallel_corpus=tatoebatools.cli:parallel_corpus"},
)
@@ -22,10 +22,10 @@ index 0000000..f128aec
+++ i/tatoebatools/cli.py
@@ -0,0 +1,13 @@
+import click
-+from xdg import XDG_DATA_HOME
++from xdg_base_dirs import xdg_data_home
+from tatoebatools import ParallelCorpus, tatoeba
+
-+tatoeba.dir = XDG_DATA_HOME / "tatoebatools"
++tatoeba.dir = xdg_data_home() / "tatoebatools"
+
+@click.command(short_help="Parallel corpus")
+@click.argument('source_language')
diff --git a/pkgs/linguistics/tatoebatools/default.nix b/pkgs/linguistics/tatoebatools/default.nix
@@ -17,7 +17,7 @@ python3Packages.buildPythonApplication rec {
postPatch = "sed -i 's/==.*\"/\"/;s/>=.*\"/\"/' setup.py";
propagatedBuildInputs = with python3Packages; [ beautifulsoup4 pandas requests sqlalchemy setuptools tqdm ]
- ++ lib.optionals withCli [ click xdg ];
+ ++ lib.optionals withCli [ click xdg-base-dirs ];
nativeCheckInputs = with python3Packages; [ pytestCheckHook ];