nur-packages

My NUR packages
git clone git://git.sikmir.ru/nur-packages
Log | Files | Refs | README | LICENSE

default.nix (1204B)


      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 
     13   src = fetchFromGitHub {
     14     owner = "LBeaudoux";
     15     repo = "tatoebatools";
     16     rev = "v${version}";
     17     hash = "sha256-45CDAH80z6zApgR4gK7ZLPSXtCyPx+6YaA61Iskued4=";
     18   };
     19 
     20   patches =
     21     lib.optional (!checkLang) ./dont-check-lang-validity.patch
     22     ++ lib.optional withCli ./cli.patch;
     23 
     24   postPatch = "sed -i 's/==.*\"/\"/;s/>=.*\"/\"/' setup.py";
     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 }