about summary refs log tree commit diff
path: root/nixpkgs/pkgs/servers/home-assistant/intents.nix
blob: ddb576795880f9bd7596ba350525cc6192b641ed (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
{ lib
, buildPythonPackage
, fetchPypi
, pythonOlder

# build-system
, setuptools
}:

buildPythonPackage rec {
  pname = "home-assistant-intents";
  version = "2024.2.28";
  format = "pyproject";

  disabled = pythonOlder "3.9";

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-EmnaYc+L1PHOv6M7odYDl+UBZkLJRtP86xPoqdbuOqU=";
  };

  postPatch = ''
    substituteInPlace pyproject.toml --replace-fail \
      'requires = ["setuptools~=62.3", "wheel~=0.37.1"]' \
      'requires = ["setuptools"]'
  '';

  nativeBuildInputs = [
    setuptools
  ];

  # sdist does not ship tests
  doCheck = false;

  pytestFlagsArray = [
    "intents/tests"
  ];

  meta = with lib; {
    description = "Intents to be used with Home Assistant";
    homepage = "https://github.com/home-assistant/intents";
    license = licenses.cc-by-40;
    maintainers = teams.home-assistant.members;
  };
}