about summary refs log tree commit diff
path: root/pkgs/servers
diff options
context:
space:
mode:
authorMartin Weinelt <hexa@darmstadt.ccc.de>2024-02-09 16:38:52 +0100
committerMartin Weinelt <hexa@darmstadt.ccc.de>2024-02-10 04:15:37 +0100
commit01ef6421f7bd039a2e5aa056fe9af899911642b9 (patch)
tree91c46afe05025df6cc21ff0a3fffbcef60419f2a /pkgs/servers
parent94860de45a19aa047ca22a2416e986cf22b0a846 (diff)
downloadnixlib-01ef6421f7bd039a2e5aa056fe9af899911642b9.tar
nixlib-01ef6421f7bd039a2e5aa056fe9af899911642b9.tar.gz
nixlib-01ef6421f7bd039a2e5aa056fe9af899911642b9.tar.bz2
nixlib-01ef6421f7bd039a2e5aa056fe9af899911642b9.tar.lz
nixlib-01ef6421f7bd039a2e5aa056fe9af899911642b9.tar.xz
nixlib-01ef6421f7bd039a2e5aa056fe9af899911642b9.tar.zst
nixlib-01ef6421f7bd039a2e5aa056fe9af899911642b9.zip
home-assistant.intents: 2024.1.2 -> 2024.2.2
Temporarily switch to source build, because the intents-package repo
content does not match the pypi source.

https://github.com/home-assistant/intents/releases/tag/2024.2.1
https://github.com/home-assistant/intents/releases/tag/2024.2.2
Diffstat (limited to 'pkgs/servers')
-rw-r--r--pkgs/servers/home-assistant/intents.nix54
1 files changed, 11 insertions, 43 deletions
diff --git a/pkgs/servers/home-assistant/intents.nix b/pkgs/servers/home-assistant/intents.nix
index 8e5921ceb2ff..8bdd0542b926 100644
--- a/pkgs/servers/home-assistant/intents.nix
+++ b/pkgs/servers/home-assistant/intents.nix
@@ -1,73 +1,41 @@
 { lib
 , buildPythonPackage
-, fetchFromGitHub
+, fetchPypi
 , pythonOlder
 
-# build
-, hassil
-, jinja2
-, pyyaml
-, regex
-, voluptuous
-, python
+# build-system
 , setuptools
-, wheel
-
-# tests
-, pytest-xdist
-, pytestCheckHook
 }:
 
 buildPythonPackage rec {
   pname = "home-assistant-intents";
-  version = "2024.1.2";
+  version = "2024.2.2";
   format = "pyproject";
 
   disabled = pythonOlder "3.9";
 
-  src = fetchFromGitHub {
-    owner = "home-assistant";
-    repo = "intents-package";
-    rev = "refs/tags/${version}";
-    hash = "sha256-uOrSvkzymG31nRmAgrn6z1IDJWahxqXHcPDflLPRVT4=";
-    fetchSubmodules = true;
+  src = fetchPypi {
+    inherit pname version;
+    hash = "sha256-Tb9ZZvs5Wyzm2TS5INUSua4Y3/2H+kHEhjpfYWJi+d0=";
   };
 
   postPatch = ''
-    substituteInPlace pyproject.toml --replace 'requires = ["setuptools~=62.3", "wheel~=0.37.1"]' 'requires = ["setuptools", "wheel"]'
+    substituteInPlace pyproject.toml --replace-fail \
+      'requires = ["setuptools~=62.3", "wheel~=0.37.1"]' \
+      'requires = ["setuptools"]'
   '';
 
   nativeBuildInputs = [
-    hassil
-    jinja2
-    pyyaml
-    regex
     setuptools
-    wheel
-    voluptuous
   ];
 
-  postInstall = ''
-    pushd intents
-    # https://github.com/home-assistant/intents/blob/main/script/package#L18
-    ${python.pythonOnBuildForHost.interpreter} -m script.intentfest merged_output $out/${python.sitePackages}/home_assistant_intents/data
-    popd
-  '';
-
-  checkInputs = [
-    pytest-xdist
-    pytestCheckHook
-  ];
+  # sdist does not ship tests
+  doCheck = false;
 
   pytestFlagsArray = [
     "intents/tests"
   ];
 
-  disabledTests = [
-    # AssertionError: Recognition failed for 'put apples on the list'
-    "test_shopping_list_HassShoppingListAddItem"
-  ];
-
   meta = with lib; {
     description = "Intents to be used with Home Assistant";
     homepage = "https://github.com/home-assistant/intents";