default.nix (1107B)
1 { lib, stdenv, python3Packages, fetchFromGitHub, withCli ? true, checkLang ? false }: 2 3 python3Packages.buildPythonApplication rec { 4 pname = "tatoebatools"; 5 version = "0.2.1"; 6 7 src = fetchFromGitHub { 8 owner = "LBeaudoux"; 9 repo = "tatoebatools"; 10 rev = "v${version}"; 11 hash = "sha256-ZsaXhGxlxFMpV4cvxfj23p4M2/zStq2VaRSSCiARd+8="; 12 }; 13 14 patches = lib.optional (!checkLang) ./dont-check-lang-validity.patch 15 ++ lib.optional withCli ./cli.patch; 16 17 postPatch = "sed -i 's/==.*\"/\"/;s/>=.*\"/\"/' setup.py"; 18 19 propagatedBuildInputs = with python3Packages; [ beautifulsoup4 pandas requests sqlalchemy setuptools tqdm ] 20 ++ lib.optionals withCli [ click xdg ]; 21 22 nativeCheckInputs = with python3Packages; [ pytestCheckHook ]; 23 24 disabledTests = lib.optionals (!checkLang) [ 25 "test_init_with_not_language_1" 26 "test_init_with_not_language_2" 27 ]; 28 29 meta = with lib; { 30 description = "A library for downloading, updating and iterating over data files from Tatoeba"; 31 inherit (src.meta) homepage; 32 license = licenses.mit; 33 maintainers = [ maintainers.sikmir ]; 34 }; 35 }