nixpkgs/pkgs/development/python-modules/pysonos/default.nix
Guillaume Girol 33afbf39f6 treewide: switch to nativeCheckInputs
checkInputs used to be added to nativeBuildInputs. Now we have
nativeCheckInputs to do that instead. Doing this treewide change allows
to keep hashes identical to before the introduction of
nativeCheckInputs.
2023-01-21 12:00:00 +00:00

52 lines
910 B
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, isPy3k
, xmltodict
, ifaddr
, requests
# Test dependencies
, pytestCheckHook
, mock
, requests-mock
}:
buildPythonPackage rec {
pname = "pysonos";
version = "0.0.54";
disabled = !isPy3k;
# pypi package is missing test fixtures
src = fetchFromGitHub {
owner = "amelchio";
repo = pname;
rev = "v${version}";
sha256 = "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 = "A SoCo fork with fixes for Home Assistant";
homepage = "https://github.com/amelchio/pysonos";
license = licenses.mit;
maintainers = with maintainers; [ juaningan ];
};
}