1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, cython 5, poetry-core 6, pytestCheckHook 7, setuptools 8, pythonOlder 9}: 10 11buildPythonPackage rec { 12 pname = "kasa-crypt"; 13 version = "0.4.0"; 14 format = "pyproject"; 15 16 disabled = pythonOlder "3.7"; 17 18 src = fetchFromGitHub { 19 owner = "bdraco"; 20 repo = "kasa-crypt"; 21 rev = "refs/tags/v${version}"; 22 hash = "sha256-wjZnro5sIRt8+vQYxA62sGnPi7Ittp3oSqph7aBBEg0="; 23 }; 24 25 postPatch = '' 26 substituteInPlace pyproject.toml \ 27 --replace " --cov=kasa_crypt --cov-report=term-missing:skip-covered" "" 28 ''; 29 30 nativeBuildInputs = [ 31 cython 32 poetry-core 33 setuptools 34 ]; 35 36 nativeCheckInputs = [ 37 pytestCheckHook 38 ]; 39 40 pythonImportsCheck = [ 41 "kasa_crypt" 42 ]; 43 44 meta = with lib; { 45 description = "Fast kasa crypt"; 46 homepage = "https://github.com/bdraco/kasa-crypt"; 47 changelog = "https://github.com/bdraco/kasa-crypt/blob/v${version}/CHANGELOG.md"; 48 license = licenses.asl20; 49 maintainers = with maintainers; [ fab ]; 50 }; 51}