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
speedtest-cli: move to pythonPackages, add to home-assistant #48596
speedtest-cli: move to pythonPackages, add to home-assistant #48596
Conversation
@GrahamcOfBorg build python3Packages.speedtest-cli |
Success on x86_64-linux (full log) Attempted: python3Packages.speedtest-cli Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: python3Packages.speedtest-cli Partial log (click to expand)
|
Success on x86_64-darwin (full log) Attempted: python3Packages.speedtest-cli Partial log (click to expand)
|
This installs two separate executables in |
Success on x86_64-linux (full log) Attempted: home-assistant Partial log (click to expand)
|
Success on x86_64-darwin (full log) Attempted: home-assistant Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: home-assistant Partial log (click to expand)
|
Cc @dotlambda |
I thought I had seen this package before. This is a duplicate of https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/networking/speedtest-cli/default.nix That package has the same issue of having two commands in |
Basically the current package should be moved into the python-modules hierarchy and be updated to use fetchPypi. Then we can add a reference in all packages like |
ah, that was the reason why it was not detected by home-assistant, i have no idea about the wrapper or the cli thingy. |
|
https://github.com/sivel/speedtest-cli/blob/master/setup.py#L70-L74 look like the lines responsible for the two commands. |
666acea
to
b03ed9c
Compare
@peterhoeg i've add a postInstall phase |
acd2de8
to
3511e52
Compare
Success on x86_64-darwin (full log) Attempted: home-assistant, speedtest-cli Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: home-assistant, speedtest-cli Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: home-assistant, speedtest-cli Partial log (click to expand)
|
pkgs/top-level/all-packages.nix
Outdated
@@ -8784,7 +8784,7 @@ with pkgs; | |||
|
|||
sparse = callPackage ../development/tools/analysis/sparse { }; | |||
|
|||
speedtest-cli = callPackage ../tools/networking/speedtest-cli { }; | |||
speedtest-cli = with pythonPackages; toPythonApplication speedtest-cli; |
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.
speedtest-cli = with pythonPackages; toPythonApplication speedtest-cli; | |
speedtest-cli = with python3Packages; toPythonApplication speedtest-cli; |
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.
speedtest-cli = with pythonPackages; toPythonApplication speedtest-cli; | |
speedtest-cli = with pythonPackages; toPythonApplication speedtest-cli; |
i had this before, but i thought that pinning to python3 would be the wrong thing to do here. The tool works with both python2 and python3, my guess was that pythonPackages
may change to python3Packages sometime in the future
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.
No, it won't since python
will probably never refer to python3
. See #18185.
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.
okay, no problem
3511e52
to
f0c643a
Compare
Success on x86_64-darwin (full log) Attempted: home-assistant, speedtest-cli Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: home-assistant, speedtest-cli Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: home-assistant, speedtest-cli Partial log (click to expand)
|
Motivation for this change
Be able to use the speedtest component in home-assistant
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)