depot/third_party/nixpkgs/pkgs/development/python-modules/tesla-powerwall/default.nix
Default email e7ec2969af Project import generated by Copybara.
GitOrigin-RevId: 9b19f5e77dd906cb52dade0b7bd280339d2a1f3d
2024-01-13 09:15:51 +01:00

53 lines
989 B
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, pytestCheckHook
, pythonOlder
, requests
, responses
, setuptools
}:
buildPythonPackage rec {
pname = "tesla-powerwall";
version = "0.4.0";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "jrester";
repo = "tesla_powerwall";
rev = "refs/tags/v${version}";
hash = "sha256-IqUxWwEvrSEbLAEnHG84oCV75qO0L5LmgpHOfaM6G8o=";
};
nativeBuildInputs = [
setuptools
];
propagatedBuildInputs = [
requests
];
nativeCheckInputs = [
pytestCheckHook
responses
];
pytestFlagsArray = [
"tests/unit"
];
pythonImportsCheck = [
"tesla_powerwall"
];
meta = with lib; {
description = "API for Tesla Powerwall";
homepage = "https://github.com/jrester/tesla_powerwall";
changelog = "https://github.com/jrester/tesla_powerwall/blob/v${version}/CHANGELOG";
license = licenses.mit;
maintainers = with maintainers; [ dotlambda ];
};
}