default.nix (1218B)
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 23 ++ lib.optional withCli ./cli.patch; 24 25 build-system = with python3Packages; [ setuptools ]; 26 27 dependencies = 28 with python3Packages; 29 [ 30 beautifulsoup4 31 pandas 32 requests 33 sqlalchemy 34 setuptools 35 tqdm 36 ] 37 ++ lib.optionals withCli [ 38 click 39 xdg-base-dirs 40 ]; 41 42 nativeCheckInputs = with python3Packages; [ pytestCheckHook ]; 43 44 disabledTests = lib.optionals (!checkLang) [ 45 "test_init_with_not_language_1" 46 "test_init_with_not_language_2" 47 ]; 48 49 meta = { 50 description = "A library for downloading, updating and iterating over data files from Tatoeba"; 51 homepage = "https://github.com/LBeaudoux/tatoebatools"; 52 license = lib.licenses.mit; 53 maintainers = [ lib.maintainers.sikmir ]; 54 }; 55 }