-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
home-assistant: relax dependencies #147483
Conversation
Me neither. For now, I'm working on fixing the deps which were affected by There is a big chance that we need a couple of new overrides for 2021.12.x. I will get to that if I have a "base line" established. |
substituteInPlace setup.py \ | ||
--replace "async_timeout==3.0.1" "async_timeout" \ | ||
--replace "awesomeversion==21.10.1" "awesomeversion" \ | ||
--replace "aiohttp==3.7.4.post0" "aiohttp" \ | ||
--replace "bcrypt==3.1.7" "bcrypt" \ | ||
--replace "pip>=8.0.3,<20.3" "pip" \ | ||
--replace "pyyaml==6.0" "pyyaml" \ | ||
--replace "yarl==1.6.3" "yarl==1.7.0" | ||
--replace "yarl==1.6.3" "yarl" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just me thinking loudly here, but maybe we could have a function to relax Python dependencies (or even something that is part of buildPython{Module,Application}
) since this is a pretty common pattern in nixpkgs 🤔 ?
Something like:
relaxSetuppyDependencies = [
"async_timeout"
"awesomeversion"
...
];
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sometimes they're in setup.py, sometimes in setup.cfg, sometimes sourced from requirements.txt or worse from python code somewhere in the repository, in newer projects in pyproject.toml and other files. It's a good idea, but gets hairy fast.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, but we could have something generic since they pretty much use the same syntax to declare its values. Maybe as a function available to Python derivations like we already have the substituteInPlace
, so we could have maybe relaxPythonDependencies setup.cfg ...
instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And of course, you can still use substituteInPlace
or even sed
if necessary for those more strange cases.
@@ -179,10 +179,13 @@ in with py.pkgs; buildPythonApplication rec { | |||
|
|||
postPatch = '' | |||
substituteInPlace setup.py \ | |||
--replace "async_timeout==3.0.1" "async_timeout" \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks very similar to my fix: Mic92@4bc1481
I'm running nixos-21.11 on aarch64 and home-assistant doesn't build without the changes in this PR because it there is no aiohttp-3.7.4.post0 Is it possible to merge this into 21.11? |
I can look into that in a bit. In the meanwhile please check out https://nixos.wiki/wiki/Home_Assistant#Running_a_recent_version_using_an_overlay, because we cannot update home-assistant on release branches. |
Sorry, the async_timeout fallout radius is too big and I think it shouldn't have landed before the branch-off. @dotlambda Basically I'd need to update home-assistant dependencies to work with async_timeout>=4.0 but then the dependencies are too new for home-assistant itself. |
Sorry for that. I don't think reverting #145602 is an option either, so I suggest we mark |
Maybe we can, within |
Motivation for this change
Meh. Not sure if this is possible to fix on master...
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)nixos/doc/manual/md-to-db.sh
to update generated release notes