nur-packages

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

default.nix (1117B)


      1 { lib, stdenv, python3Packages, fetchFromGitHub, withCli ? true, checkLang ? false }:
      2 
      3 python3Packages.buildPythonApplication rec {
      4   pname = "tatoebatools";
      5   version = "0.2.3";
      6 
      7   src = fetchFromGitHub {
      8     owner = "LBeaudoux";
      9     repo = "tatoebatools";
     10     rev = "v${version}";
     11     hash = "sha256-45CDAH80z6zApgR4gK7ZLPSXtCyPx+6YaA61Iskued4=";
     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-base-dirs ];
     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 }