depot/third_party/nixpkgs/pkgs/development/python-modules/pysonos/default.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

53 lines
943 B
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
isPy3k,
xmltodict,
ifaddr,
requests,
# Test dependencies
pytestCheckHook,
mock,
requests-mock,
}:
buildPythonPackage rec {
pname = "pysonos";
version = "0.0.54";
format = "setuptools";
disabled = !isPy3k;
# pypi package is missing test fixtures
src = fetchFromGitHub {
owner = "amelchio";
repo = pname;
rev = "v${version}";
hash = "sha256-gBOknYHL5nQWFVhCbLN0Ah+1fovcNY4P2myryZnUadk=";
};
propagatedBuildInputs = [
ifaddr
requests
xmltodict
];
nativeCheckInputs = [
pytestCheckHook
mock
requests-mock
];
disabledTests = [
"test_desc_from_uri" # test requires network access
];
meta = with lib; {
description = "SoCo fork with fixes for Home Assistant";
homepage = "https://github.com/amelchio/pysonos";
license = licenses.mit;
maintainers = with maintainers; [ juaningan ];
};
}