depot/third_party/nixpkgs/pkgs/development/python-modules/kasa-crypt/default.nix
Default email b5f92a349c Project import generated by Copybara.
GitOrigin-RevId: 7c9cc5a6e5d38010801741ac830a3f8fd667a7a0
2023-10-19 15:55:26 +02:00

51 lines
1,017 B
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, cython
, poetry-core
, pytestCheckHook
, setuptools
, pythonOlder
}:
buildPythonPackage rec {
pname = "kasa-crypt";
version = "0.4.0";
format = "pyproject";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "bdraco";
repo = "kasa-crypt";
rev = "refs/tags/v${version}";
hash = "sha256-wjZnro5sIRt8+vQYxA62sGnPi7Ittp3oSqph7aBBEg0=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace " --cov=kasa_crypt --cov-report=term-missing:skip-covered" ""
'';
nativeBuildInputs = [
cython
poetry-core
setuptools
];
nativeCheckInputs = [
pytestCheckHook
];
pythonImportsCheck = [
"kasa_crypt"
];
meta = with lib; {
description = "Fast kasa crypt";
homepage = "https://github.com/bdraco/kasa-crypt";
changelog = "https://github.com/bdraco/kasa-crypt/blob/v${version}/CHANGELOG.md";
license = licenses.asl20;
maintainers = with maintainers; [ fab ];
};
}