Skip to content
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

Revert "nixos/home-assistant: use override before overridePythonAttrs" #119191

Merged
merged 3 commits into from Apr 17, 2021

Conversation

mweinelt
Copy link
Member

Reverts #118719

This breaks patching the package, overriding is a mess.

@@ -188,9 +183,13 @@ in {
};

package = mkOption {
default = pkgs.home-assistant;
default = pkgs.home-assistant.overridePythonAttrs (oldAttrs: {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This shouldn't use overridePythonAttrs because that breaks the override that occurs later.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mweinelt
I agree with @dotlambda, overriding the default package with overridePythonAttrs already proved problematic here:
f9bd8b1
I think we should use overrideAttrs instead, like you did initially:
1050f14

Copy link
Member Author

@mweinelt mweinelt Apr 13, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So is the idea to revert f9bd8b1 as well?

@mweinelt
Copy link
Member Author

Apparently this also disabled checkPhase on the nixos test.

https://logs.nix.ci/?key=nixos/nixpkgs.119276&attempt_id=cc9ad186-b19c-4ab8-b7cf-790ba45949e0

@sweber83
Copy link
Contributor

@mweinelt
I don't really know much about the home assistant nixos tests.
Do I understand correctly, that the package tests (which we want to disable) run as part of the nixos tests, which are used to test the home assistant nixos module inside a vm?
So we count on the modules default package to have the tests enabled?

@dotlambda
Copy link
Member

Apparently this also disabled checkPhase on the nixos test.

I don't think that's a problem, but we can override the package we use for the test.

@mweinelt
Copy link
Member Author

So we count on the modules default package to have the tests enabled?

No, the other way around. The module package has them disabled by default, if you just pass pkgs.home-assistant, like the test does, they'll be enabled.

@mweinelt
Copy link
Member Author

@dotlambda @sweber83 Is the state of this pr okay? I added another revert.

@mweinelt mweinelt merged commit e5cc06a into master Apr 17, 2021
@mweinelt mweinelt deleted the revert-118719-home-assistant-tests branch April 17, 2021 00:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants