mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-30 16:10:36 +00:00
48 lines
1.1 KiB
Nix
48 lines
1.1 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
poetry-core,
|
|
pytestCheckHook,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "govee-local-api";
|
|
version = "3.1.0";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "Galorhallen";
|
|
repo = "govee-local-api";
|
|
tag = "v${version}";
|
|
hash = "sha256-0MrT99GbtBrYkKxathl51YvaKnyflNQgwnp8JP1zrRc=";
|
|
};
|
|
|
|
postPatch = ''
|
|
# dont depend on poetry at runtime
|
|
# https://github.com/Galorhallen/govee-local-api/pull/75/files#r1943826599
|
|
sed -i '/poetry = "^1.8.5"/d' pyproject.toml
|
|
'';
|
|
|
|
build-system = [ poetry-core ];
|
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
|
|
|
pythonImportsCheck = [ "govee_local_api" ];
|
|
|
|
disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [
|
|
"test_reuseaddr_and_broadcast_are_set"
|
|
];
|
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
meta = {
|
|
description = "Library to communicate with Govee local API";
|
|
homepage = "https://github.com/Galorhallen/govee-local-api";
|
|
changelog = "https://github.com/Galorhallen/govee-local-api/releases/tag/${src.tag}";
|
|
license = lib.licenses.asl20;
|
|
maintainers = with lib.maintainers; [ fab ];
|
|
};
|
|
}
|