fix(hass): override urllib for spotifyplus
All checks were successful
Discord / discord commits (push) Has been skipped
All checks were successful
Discord / discord commits (push) Has been skipped
This commit is contained in:
parent
f67d3a4788
commit
06669e8679
5 changed files with 85 additions and 7 deletions
|
@ -1,4 +1,8 @@
|
|||
{pkgs, ...}: {
|
||||
{
|
||||
pkgs,
|
||||
self,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
./assist.nix
|
||||
./bluetooth.nix
|
||||
|
@ -47,6 +51,12 @@
|
|||
services.home-assistant = {
|
||||
enable = true;
|
||||
|
||||
package = pkgs.home-assistant.override {
|
||||
packageOverrides = _: super: {
|
||||
inherit (self.packages.${pkgs.system}) urllib3;
|
||||
};
|
||||
};
|
||||
|
||||
extraComponents = [
|
||||
"androidtv_remote"
|
||||
"caldav"
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
self,
|
||||
buildHassComponent,
|
||||
smartinspect-src,
|
||||
spotifywebapi-src,
|
||||
|
@ -6,13 +7,16 @@
|
|||
...
|
||||
}: let
|
||||
python3Packages = pkgs.python3Packages.override {
|
||||
overrides = self: super: rec {
|
||||
overrides = _: super: rec {
|
||||
smartinspect = pkgs.callPackage ./smartinspect.nix {
|
||||
inherit python3Packages smartinspect-src;
|
||||
};
|
||||
spotifywebapi = pkgs.callPackage ./spotifywebapi.nix {
|
||||
inherit python3Packages smartinspect spotifywebapi-src;
|
||||
};
|
||||
urllib3 = self.packages.${pkgs.system}.urllib3.override {
|
||||
inherit python3Packages;
|
||||
};
|
||||
};
|
||||
};
|
||||
in
|
||||
|
|
|
@ -15,11 +15,6 @@ in
|
|||
|
||||
src = spotifyplus-src;
|
||||
|
||||
prePatch = ''
|
||||
substituteInPlace ./custom_components/spotifyplus/manifest.json \
|
||||
--replace-warn "urllib3>=1.21.1,<1.27" "urllib3>=1.21.1"
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = with python3Packages; [
|
||||
oauthlib
|
||||
platformdirs
|
||||
|
|
|
@ -41,4 +41,6 @@
|
|||
trash-d = pkgs.callPackage ./trash-d {
|
||||
inherit (inputs) trash-d-src;
|
||||
};
|
||||
|
||||
urllib3 = pkgs.callPackage ./urllib3 {};
|
||||
}
|
||||
|
|
67
packages/urllib3/default.nix
Normal file
67
packages/urllib3/default.nix
Normal file
|
@ -0,0 +1,67 @@
|
|||
# From nixpkgs 4c0061c983a2bcb888f5c478cfb7631ec1090c22
|
||||
{
|
||||
lib,
|
||||
fetchPypi,
|
||||
python3Packages,
|
||||
}:
|
||||
python3Packages.buildPythonPackage rec {
|
||||
pname = "urllib3";
|
||||
version = "1.26.16";
|
||||
format = "setuptools";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-jxNfZQJ1a95rKpsomJ31++h8mXDOyqaQQe3M5/BYmxQ=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs =
|
||||
passthru.optional-dependencies.brotli
|
||||
++ passthru.optional-dependencies.socks;
|
||||
|
||||
nativeCheckInputs = with python3Packages; [
|
||||
python-dateutil
|
||||
mock
|
||||
pytest-freezegun
|
||||
pytest-timeout
|
||||
pytestCheckHook
|
||||
tornado
|
||||
trustme
|
||||
];
|
||||
|
||||
doCheck = false;
|
||||
|
||||
preCheck = ''
|
||||
export CI # Increases LONG_TIMEOUT
|
||||
'';
|
||||
|
||||
pythonImportsCheck = [
|
||||
"urllib3"
|
||||
];
|
||||
|
||||
passthru.optional-dependencies = with python3Packages; {
|
||||
brotli =
|
||||
if isPyPy
|
||||
then [
|
||||
brotlicffi
|
||||
]
|
||||
else [
|
||||
brotli
|
||||
];
|
||||
secure = [
|
||||
certifi
|
||||
cryptography
|
||||
idna
|
||||
pyopenssl
|
||||
];
|
||||
socks = [
|
||||
pysocks
|
||||
];
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "Powerful, sanity-friendly HTTP client for Python";
|
||||
homepage = "https://github.com/shazow/urllib3";
|
||||
changelog = "https://github.com/urllib3/urllib3/blob/${version}/CHANGES.rst";
|
||||
license = licenses.mit;
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue