package.nix (1214B)
1 { 2 lib, 3 python3Packages, 4 fetchFromGitHub, 5 withCli ? true, 6 checkLang ? false, 7 }: 8 9 python3Packages.buildPythonApplication rec { 10 pname = "tatoebatools"; 11 version = "0.2.3"; 12 pyproject = true; 13 14 src = fetchFromGitHub { 15 owner = "LBeaudoux"; 16 repo = "tatoebatools"; 17 tag = "v${version}"; 18 hash = "sha256-45CDAH80z6zApgR4gK7ZLPSXtCyPx+6YaA61Iskued4="; 19 }; 20 21 patches = 22 lib.optional (!checkLang) ./dont-check-lang-validity.patch ++ lib.optional withCli ./cli.patch; 23 24 build-system = with python3Packages; [ setuptools ]; 25 26 dependencies = 27 with python3Packages; 28 [ 29 beautifulsoup4 30 pandas 31 requests 32 sqlalchemy 33 setuptools 34 tqdm 35 ] 36 ++ lib.optionals withCli [ 37 click 38 xdg-base-dirs 39 ]; 40 41 nativeCheckInputs = with python3Packages; [ pytestCheckHook ]; 42 43 disabledTests = lib.optionals (!checkLang) [ 44 "test_init_with_not_language_1" 45 "test_init_with_not_language_2" 46 ]; 47 48 meta = { 49 description = "A library for downloading, updating and iterating over data files from Tatoeba"; 50 homepage = "https://github.com/LBeaudoux/tatoebatools"; 51 license = lib.licenses.mit; 52 maintainers = [ lib.maintainers.sikmir ]; 53 }; 54 }
