mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 07:23:20 +00:00
b514253c07
Diff: https://github.com/KapJI/homeassistant-stubs/compare/refs/tags/2023.3.2...2023.3.4 Changelog: https://github.com/KapJI/homeassistant-stubs/releases/tag/2023.3.4
50 lines
1.1 KiB
Nix
50 lines
1.1 KiB
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, poetry-core
|
|
, home-assistant
|
|
, python
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "homeassistant-stubs";
|
|
version = "2023.3.4";
|
|
format = "pyproject";
|
|
|
|
disabled = python.version != home-assistant.python.version;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "KapJI";
|
|
repo = "homeassistant-stubs";
|
|
rev = "refs/tags/${version}";
|
|
hash = "sha256-uNwh1IYn3rDwj+FB8h9SwbFaju7cnCWl7HjX0mdw/UA=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
poetry-core
|
|
home-assistant
|
|
];
|
|
|
|
postPatch = ''
|
|
# Relax constraint to year and month
|
|
substituteInPlace pyproject.toml --replace \
|
|
'homeassistant = "${version}"' \
|
|
'homeassistant = "~${lib.versions.majorMinor home-assistant.version}"'
|
|
cat pyproject.toml
|
|
'';
|
|
|
|
pythonImportsCheck = [
|
|
"homeassistant-stubs"
|
|
];
|
|
|
|
doCheck = false;
|
|
|
|
meta = with lib; {
|
|
description = "Typing stubs for Home Assistant Core";
|
|
homepage = "https://github.com/KapJI/homeassistant-stubs";
|
|
changelog = "https://github.com/KapJI/homeassistant-stubs/releases/tag/${version}";
|
|
license = licenses.mit;
|
|
maintainers = teams.home-assistant.members;
|
|
};
|
|
}
|