48 lines
889 B
Nix
Raw Normal View History

2019-05-10 15:34:29 +02:00
{ lib
, buildPythonPackage
, fetchFromGitHub
2019-05-10 15:34:29 +02:00
, isPy3k
, xmltodict
, ifaddr
, requests
2019-05-10 15:34:29 +02:00
# Test dependencies
, pytestCheckHook
, mock
, requests-mock
2019-05-10 15:34:29 +02:00
}:
buildPythonPackage rec {
pname = "pysonos";
version = "0.0.45";
2019-05-10 15:34:29 +02:00
disabled = !isPy3k;
# pypi package is missing test fixtures
src = fetchFromGitHub {
owner = "amelchio";
repo = pname;
rev = "v${version}";
sha256 = "0wzmrd9ja5makvsgf0ckil99wr8vw91dml8fi9miiq4la0100q0n";
2019-05-10 15:34:29 +02:00
};
propagatedBuildInputs = [ ifaddr requests xmltodict ];
2019-05-10 15:34:29 +02:00
checkInputs = [
pytestCheckHook
mock
requests-mock
2019-05-10 15:34:29 +02:00
];
disabledTests = [
"test_desc_from_uri" # test requires network access
];
2019-05-10 15:34:29 +02:00
meta = {
homepage = "https://github.com/amelchio/pysonos";
2019-05-10 15:34:29 +02:00
description = "A SoCo fork with fixes for Home Assistant";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ juaningan ];
};
}