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