nur-packages

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

default.nix (1196B)


      1 {
      2   lib,
      3   stdenv,
      4   python3Packages,
      5   fetchFromGitHub,
      6   withCli ? true,
      7   checkLang ? false,
      8 }:
      9 
     10 python3Packages.buildPythonApplication rec {
     11   pname = "tatoebatools";
     12   version = "0.2.3";
     13 
     14   src = fetchFromGitHub {
     15     owner = "LBeaudoux";
     16     repo = "tatoebatools";
     17     rev = "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   postPatch = "sed -i 's/==.*\"/\"/;s/>=.*\"/\"/' setup.py";
     26 
     27   propagatedBuildInputs =
     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     inherit (src.meta) homepage;
     52     license = lib.licenses.mit;
     53     maintainers = [ lib.maintainers.sikmir ];
     54   };
     55 }