nixpkgs/pkgs/development/python-modules/aiowatttime/default.nix
Martin Weinelt 0215034f25 python3.pkgs: Migrate fetchers to use hash
when they already rely on SRI hashes.
2023-03-03 23:59:29 +01:00

54 lines
1 KiB
Nix

{ lib
, aiohttp
, aresponses
, buildPythonPackage
, fetchFromGitHub
, poetry-core
, pytest-aiohttp
, pytest-asyncio
, pytestCheckHook
, pythonOlder
}:
buildPythonPackage rec {
pname = "aiowatttime";
version = "2022.10.0";
format = "pyproject";
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "bachya";
repo = pname;
rev = "refs/tags/${version}";
hash = "sha256-rqmsUvVwXC/XkR/v2d9d3t7u6Poms4ORiOci41ajXIo=";
};
nativeBuildInputs = [
poetry-core
];
propagatedBuildInputs = [
aiohttp
];
nativeCheckInputs = [
aresponses
pytest-aiohttp
pytest-asyncio
pytestCheckHook
];
# Ignore the examples directory as the files are prefixed with test_
disabledTestPaths = [ "examples/" ];
pythonImportsCheck = [ "aiowatttime" ];
meta = with lib; {
description = "Python library for interacting with WattTime";
homepage = "https://github.com/bachya/aiowatttime";
license = with licenses; [ mit ];
maintainers = with maintainers; [ fab ];
};
}