Merge pull request #196071 from NixOS/home-assistant

This commit is contained in:
Martin Weinelt 2022-10-17 02:28:55 +02:00 committed by GitHub
commit 71fb59d840
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 130 additions and 116 deletions

View File

@ -0,0 +1,45 @@
{ buildPythonPackage
, fetchPypi
, lib
# propagates
, click
, dlib
, face-recognition-models
, numpy
, pillow
# tests
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "face-recognition";
version = "1.3.0";
format = "setuptools";
src = fetchPypi {
pname = "face_recognition";
inherit version;
hash = "sha256-Xl790WhqpWavDTzBMTsTHksZdleo/9A2aebT+tknBew=";
};
propagatedBuildInputs = [
click
dlib
face-recognition-models
numpy
pillow
];
checkInputs = [
pytestCheckHook
];
meta = with lib; {
license = licenses.mit;
homepage = "https://github.com/ageitgey/face_recognition";
maintainers = with maintainers; [ ];
description = "The world's simplest facial recognition api for Python and the command line";
};
}

View File

@ -0,0 +1,35 @@
{ buildPythonPackage
, lib
, fetchPypi
, setuptools
}:
buildPythonPackage rec {
pname = "face-recognition-models";
version = "0.3.0";
format = "setuptools";
src = fetchPypi {
pname = "face_recognition_models";
inherit version;
hash = "sha256-t5vSAKiMh8mp1EbJkK5xxaYm0fNzAXTm1XAVf/HYls8=";
};
propagatedBuildInputs = [
setuptools
];
# no tests
doCheck = false;
pythonImportsCheck = [
"face_recognition_models"
];
meta = with lib; {
homepage = "https://github.com/ageitgey/face_recognition_models";
license = licenses.cc0;
maintainers = with maintainers; [ ];
description = "Trained models for the face_recognition python library";
};
}

View File

@ -1,42 +0,0 @@
{ buildPythonPackage, fetchFromGitHub, pillow, click, dlib, numpy
, face_recognition_models, lib, flake8, pytest, glibcLocales
}:
buildPythonPackage rec {
pname = "face_recognition";
version = "1.3.0";
src = fetchFromGitHub {
repo = pname;
owner = "ageitgey";
rev = "d34c622bf42e2c619505a4884017051ecf61ac77";
sha256 = "052878vnh3vbrsvmpgr0bx78k524dlxn47b2xakzbxk7dyjrgcli";
};
postPatch = ''
substituteInPlace setup.py --replace "flake8==2.6.0" "flake8"
'';
propagatedBuildInputs = [ pillow click dlib numpy face_recognition_models ];
# Our dlib is compiled with AVX instructions by default which breaks
# with "Illegal instruction" on some builders due to missing hardware features.
#
# As this makes the build fairly unreliable, it's better to skip the test and to ensure that
# the build is working and after each change to the package, manual testing should be done.
doCheck = false;
# Although tests are disabled by default, checkPhase still exists, so
# maintainers can check the package's functionality locally before modifying it.
checkInputs = [ flake8 pytest glibcLocales ];
checkPhase = ''
LC_ALL="en_US.UTF-8" py.test
'';
meta = with lib; {
license = licenses.mit;
homepage = "https://github.com/ageitgey/face_recognition";
maintainers = with maintainers; [ ];
description = "The world's simplest facial recognition api for Python and the command line";
};
}

View File

@ -1,23 +0,0 @@
{ buildPythonPackage, lib, fetchPypi, setuptools }:
buildPythonPackage rec {
pname = "face_recognition_models";
version = "0.3.0";
src = fetchPypi {
inherit pname version;
sha256 = "1kwnv3qpy5bhspk780bkyg8jd9n5f6p91ja6sjlwk1wcm00d56xp";
};
# no module named `tests` as no tests are available
doCheck = false;
propagatedBuildInputs = [ setuptools ];
meta = with lib; {
homepage = "https://github.com/ageitgey/face_recognition_models";
license = licenses.cc0;
maintainers = with maintainers; [ ];
description = "Trained models for the face_recognition python library";
};
}

View File

@ -8,11 +8,12 @@
}:
buildPythonPackage rec {
pname = "matrix_client";
pname = "matrix-client";
version = "0.4.0";
src = fetchPypi {
inherit pname version;
pname = "matrix_client";
inherit version;
sha256 = "0mii7ib3bah5ppqs7i8sjv5l0zbl57011908m4l0jbyby90ayy06";
};

View File

@ -9,8 +9,9 @@
}:
buildPythonPackage rec {
pname = "pushbullet.py";
pname = "pushbullet-py";
version = "0.12.0";
format = "setuptools";
src = fetchPypi {
inherit pname version;

View File

@ -2,7 +2,7 @@
# Do not edit!
{
version = "2022.10.3";
version = "2022.10.4";
components = {
"abode" = ps: with ps; [
abodepy
@ -635,10 +635,10 @@
zeroconf
];
"dlib_face_detect" = ps: with ps; [
face_recognition
face-recognition
];
"dlib_face_identify" = ps: with ps; [
face_recognition
face-recognition
];
"dlink" = ps: with ps; [
]; # missing inputs: pyW215
@ -1276,12 +1276,12 @@
sqlalchemy
];
"homekit" = ps: with ps; [
hap-python
pyqrcode
pyturbojpeg
aiohttp-cors
base36
fnvhash
hap-python
ha-ffmpeg
ifaddr
zeroconf
@ -2369,7 +2369,7 @@
aiohttp-cors
];
"pushbullet" = ps: with ps; [
pushbullet
pushbullet-py
];
"pushover" = ps: with ps; [
pushover-complete

View File

@ -40,9 +40,7 @@ let
hash = "sha256-87IMcLaoCn0Vns8Ub/AFmv0gXtS0aPZX0cSt7+lOPm4=";
};
});
})
(self: super: {
bsblan = super.bsblan.overridePythonAttrs (oldAttrs: rec {
version = "0.5.0";
postPatch = null;
@ -54,9 +52,7 @@ let
hash = "sha256-yzlHcIb5QlG+jAgEtKlAcY7rESiUY7nD1YwqK63wgcg=";
};
});
})
(self: super: {
blebox-uniapi = super.blebox-uniapi.overridePythonAttrs (oldAttrs: rec {
version = "2.0.2";
src = fetchFromGitHub {
@ -66,9 +62,7 @@ let
hash = "sha256-0Yiooy7YSUFjqqcyH2fPQ6AWuR0EJxfRRZTw/6JGcMA=";
};
});
})
(self: super: {
gridnet = super.gridnet.overridePythonAttrs (oldAttrs: rec {
version = "4.0.0";
src = fetchFromGitHub {
@ -78,10 +72,29 @@ let
hash = "sha256-Ihs8qUx50tAUcRBsVArRhzoLcQUi1vbYh8sPyK75AEk=";
};
});
})
# pytest-aiohttp>0.3.0 breaks home-assistant tests
(self: super: {
hap-python = super.hap-python.overridePythonAttrs (oldAtrs: rec {
pname = "ha-hap-python";
version = "4.5.2";
src = fetchFromGitHub {
owner = "bdraco";
repo = "ha-HAP-python";
rev = "refs/tags/v4.5.2";
hash = "sha256-xCmx5QopNShKIuXewT+T86Bxyi4P0ddh8r2UlJ48Wig=";
};
});
iaqualink = super.iaqualink.overridePythonAttrs (oldAttrs: rec {
version = "0.4.1";
src = fetchFromGitHub {
owner = "flz";
repo = "iaqualink-py";
rev = "v${version}";
hash = "sha256-GDJwPBEU7cteAdYj7eo5tAo0G8AVcQR7KSxLNLhU/XU=";
};
});
# pytest-aiohttp>0.3.0 breaks home-assistant tests
pytest-aiohttp = super.pytest-aiohttp.overridePythonAttrs (oldAttrs: rec {
version = "0.3.0";
src = self.fetchPypi {
@ -126,10 +139,8 @@ let
zwave-js-server-python = super.zwave-js-server-python.overridePythonAttrs (oldAttrs: {
doCheck = false; # requires aiohttp>=1.0.0
});
})
# Pinned due to API changes in 0.1.0
(self: super: {
# Pinned due to API changes in 0.1.0
poolsense = super.poolsense.overridePythonAttrs (oldAttrs: rec {
version = "0.0.8";
src = super.fetchPypi {
@ -138,10 +149,8 @@ let
hash = "sha256-17MHrYRmqkH+1QLtgq2d6zaRtqvb9ju9dvPt9gB2xCc=";
};
});
})
# Pinned due to API changes >0.3.5.3
(self: super: {
# Pinned due to API changes >0.3.5.3
pyatag = super.pyatag.overridePythonAttrs (oldAttrs: rec {
version = "0.3.5.3";
src = fetchFromGitHub {
@ -151,15 +160,11 @@ let
sha256 = "00ly4injmgrj34p0lyx7cz2crgnfcijmzc0540gf7hpwha0marf6";
};
});
})
(self: super: {
pydeconz = super.pydeconz.overridePythonAttrs (oldAttrs: rec {
doCheck = false; # requires pytest-aiohttp>=1.0.0
});
})
(self: super: {
python-slugify = super.python-slugify.overridePythonAttrs (oldAttrs: rec {
pname = "python-slugify";
version = "4.0.1";
@ -168,9 +173,7 @@ let
hash = "sha256-aaUXdm4AwSaOW7/A0BCgqFCN4LGNMK1aH/NX+K5yQnA=";
};
});
})
(self: super: {
pytradfri = super.pytradfri.overridePythonAttrs (oldAttrs: rec {
version = "9.0.0";
src = fetchFromGitHub {
@ -180,9 +183,7 @@ let
hash = "sha256-12ol+2CnoPfkxmDGJJAkoafHGpQuWC4lh0N7lSvx2DE=";
};
});
})
(self: super: {
pysoma = super.pysoma.overridePythonAttrs (oldAttrs: rec {
version = "0.0.10";
src = super.fetchPypi {
@ -191,10 +192,8 @@ let
hash = "sha256-sU1qHbAjdIUu0etjate8+U1zvunbw3ddBtDVUU10CuE=";
};
});
})
# Pinned due to API changes in 0.3.0
(self: super: {
# Pinned due to API changes in 0.3.0
tailscale = super.tailscale.overridePythonAttrs (oldAttrs: rec {
version = "0.2.0";
src = fetchFromGitHub {
@ -204,10 +203,8 @@ let
hash = "sha256-/tS9ZMUWsj42n3MYPZJYJELzX3h02AIHeRZmD2SuwWE=";
};
});
})
# Pinned due to API changes in 0.4.0
(self: super: {
# Pinned due to API changes in 0.4.0
vilfo-api-client = super.vilfo-api-client.overridePythonAttrs (oldAttrs: rec {
version = "0.3.3";
src = fetchFromGitHub {
@ -217,10 +214,8 @@ let
sha256 = "1gy5gpsg99rcm1cc3m30232za00r9i46sp74zpd12p3vzz1wyyqf";
};
});
})
# Pinned due to API changes ~1.0
(self: super: {
# Pinned due to API changes ~1.0
vultr = super.vultr.overridePythonAttrs (oldAttrs: rec {
version = "0.1.2";
src = fetchFromGitHub {
@ -230,10 +225,8 @@ let
sha256 = "1qjvvr2v9gfnwskdl0ayazpcmiyw9zlgnijnhgq9mcri5gq9jw5h";
};
});
})
# home-assistant-frontend does not exist in python3.pkgs
(self: super: {
# home-assistant-frontend does not exist in python3.pkgs
home-assistant-frontend = self.callPackage ./frontend.nix { };
})
];
@ -261,7 +254,7 @@ let
extraPackagesFile = writeText "home-assistant-packages" (lib.concatMapStringsSep "\n" (pkg: pkg.pname) extraBuildInputs);
# Don't forget to run parse-requirements.py after updating
hassVersion = "2022.10.3";
hassVersion = "2022.10.4";
in python.pkgs.buildPythonApplication rec {
pname = "homeassistant";
@ -279,7 +272,7 @@ in python.pkgs.buildPythonApplication rec {
owner = "home-assistant";
repo = "core";
rev = version;
hash = "sha256-5ffMs6gXOyg0hhB0Wx4bRmSqkr0uRhNcLhLo1PI2UqE=";
hash = "sha256-949QvezOYW6hA3iU9j2Wu6DhX35CzW0ruwGe3JGPsH4=";
};
# leave this in, so users don't have to constantly update their downstream patch handling

View File

@ -37,10 +37,11 @@ PKG_SET = "home-assistant.python.pkgs"
# If some requirements are matched by multiple or no Python packages, the
# following can be used to choose the correct one
PKG_PREFERENCES = {
"fiblary3": "fiblary3-fork", # https://github.com/home-assistant/core/issues/66466
"ha-av": "av",
"youtube_dl": "youtube-dl-light",
"ha-HAP-python": "hap-python",
"tensorflow": "tensorflow",
"fiblary3": "fiblary3-fork", # https://github.com/home-assistant/core/issues/66466
"youtube_dl": "youtube-dl-light",
}

View File

@ -23,7 +23,7 @@ python3Packages.buildPythonApplication rec {
markdown2
matrix-client
minidb
pushbullet
pushbullet-py
pycodestyle
pyppeteer
pyyaml

View File

@ -71,6 +71,8 @@ mapAliases ({
dogpile-core = throw "dogpile-core is no longer maintained, use dogpile-cache instead"; # added 2021-11-20
eebrightbox = throw "eebrightbox is unmaintained upstream and has therefore been removed"; # added 2022-02-03
email_validator = email-validator; # added 2022-06-22
face_recognition = face-recognition; # added 2022-10-15
face_recognition_models = face-recognition-models; # added 2022-10-15
fake_factory = throw "fake_factory has been removed because it is unused and deprecated by upstream since 2016."; # added 2022-05-30
faulthandler = throw "faulthandler is built into ${python.executable}"; # added 2021-07-12
flask_sqlalchemy = flask-sqlalchemy; # added 2022-07-20
@ -121,6 +123,7 @@ mapAliases ({
prometheus_client = prometheus-client; # added 2021-06-10
prompt_toolkit = prompt-toolkit; # added 2021-07-22
pur = throw "pur has been renamed to pkgs.pur"; # added 2021-11-08
pushbullet = pushbullet-py; # Added 2022-10-15
pydrive = throw "pydrive is broken and deprecated and has been replaced with pydrive2."; # added 2022-06-01
pyGtkGlade = throw "Glade support for pygtk has been removed"; # added 2022-01-15
pycallgraph = throw "pycallgraph has been removed, it was using setuptools 2to3 translation feature, which has been removed in setuptools 58"; # added 2022-01-18

View File

@ -3219,9 +3219,9 @@ in {
facedancer = callPackage ../development/python-modules/facedancer { };
face_recognition = callPackage ../development/python-modules/face_recognition { };
face-recognition = callPackage ../development/python-modules/face-recognition { };
face_recognition_models = callPackage ../development/python-modules/face_recognition_models { };
face-recognition-models = callPackage ../development/python-modules/face-recognition/models.nix { };
factory_boy = callPackage ../development/python-modules/factory_boy { };
@ -7476,7 +7476,7 @@ in {
push-receiver = callPackage ../development/python-modules/push-receiver { };
pushbullet = callPackage ../development/python-modules/pushbullet { };
pushbullet-py = callPackage ../development/python-modules/pushbullet-py { };
pushover-complete = callPackage ../development/python-modules/pushover-complete { };