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
mps-youtube: 0.2.8 -> unstable-2020-01-28 #80269
Conversation
3ebdaf7
to
2b38a9f
Compare
2b38a9f
to
785fe19
Compare
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 commit is broken
$ ./results/python37Packages.mps-youtube/bin/mpsyt
could not load MPRIS interface. missing libraries.
Traceback (most recent call last):
File "/nix/store/fiwc2apkmm7840d5vb2fmhh5lml2dhwy-python3.7-mps-youtube-unstable-2020-01-28/bin/.mpsyt-wrapped", line 6, in <module>
from mps_youtube import main
File "/nix/store/fiwc2apkmm7840d5vb2fmhh5lml2dhwy-python3.7-mps-youtube-unstable-2020-01-28/lib/python3.7/site-packages/mps_youtube/__init__.py", line 9, in <module>
from . import main
File "/nix/store/fiwc2apkmm7840d5vb2fmhh5lml2dhwy-python3.7-mps-youtube-unstable-2020-01-28/lib/python3.7/site-packages/mps_youtube/main.py", line 30, in <module>
from . import g, c, commands, screen, history, util
File "/nix/store/fiwc2apkmm7840d5vb2fmhh5lml2dhwy-python3.7-mps-youtube-unstable-2020-01-28/lib/python3.7/site-packages/mps_youtube/commands/__init__.py", line 5, in <module>
from ..main import completer
ImportError: cannot import name 'completer' from 'mps_youtube.main' (/nix/store/fiwc2apkmm7840d5vb2fmhh5lml2dhwy-python3.7-mps-youtube-unstable-2020-01-28/lib/python3.7/site-packages/mps_youtube/main.py)
[nix-shell:/nix/store/fiwc2apkmm7840d5vb2fmhh5lml2dhwy-python3.7-mps-youtube-unstable-2020-01-28/lib/python3.7/site-packages]$ cd mps_youtube
__init__.py c.py commands content.py description_parser.py helptext.py init.py main.py paths.py players playlists.py streams.py util.py
__pycache__ cache.py config.py contentquery.py g.py history.py listview mpris.py player.py playlist.py screen.py terminalsize.py
they reference a module that doesn't exist anymore
Works on my side (it feels weird to say this when using NixOS): $ grep completer /nix/store/d3yrji9kp1kn2jvnb056wlkz60k8503d-python3.7-mps-youtube-unstable-2020-01-28 Sun 16 Feb 2020 06:52:34 PM CET
/nix/store/d3yrji9kp1kn2jvnb056wlkz60k8503d-python3.7-mps-youtube-unstable-2020-01-28/lib/python3.7/site-packages/mps_youtube/main.py
34:completer = None
39: completer = util.CommandCompleter()
41: readline.set_completer(completer.complete_command)
42: readline.set_completer_delims('')
/nix/store/d3yrji9kp1kn2jvnb056wlkz60k8503d-python3.7-mps-youtube-unstable-2020-01-28/lib/python3.7/site-packages/mps_youtube/commands/__init__.py
5:from ..main import completer
28: completer.add_cmd(command)
|
is this supposed to be used as a standalone application? (like a cli utility?) |
Yes, this is a standalone CLI application. |
The reason why I ask is that we could export this as a top level |
I've just replaced |
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.
Please move the expression out of python-modules and into an appropriate directory
edd5a51
to
4d0be84
Compare
Moved to |
would still like @FRidh to sign off @worldofpeace do you have any strong feelings? |
LGTM, for what it's worth |
pkgs/top-level/all-packages.nix
Outdated
@@ -20371,6 +20371,10 @@ in | |||
|
|||
mpc-qt = libsForQt5.callPackage ../applications/video/mpc-qt { }; | |||
|
|||
mps-youtube = callPackage ../applications/misc/mps-youtube { | |||
pythonPackages = python3Packages; |
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.
remove the argument
{ lib, buildPythonPackage, fetchFromGitHub, isPy3k | ||
, pafy | ||
}: | ||
{ lib, pythonPackages, fetchFromGitHub }: |
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.
use python3Packages here
pkgs/top-level/python-packages.nix
Outdated
@@ -6383,7 +6383,7 @@ in { | |||
|
|||
maildir-deduplicate = callPackage ../development/python-modules/maildir-deduplicate { }; | |||
|
|||
mps-youtube = callPackage ../development/python-modules/mps-youtube { }; | |||
mps-youtube = throw "mps-youtube has moved to all-packages, and is no longer available as a python module."; |
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.
would love to do this, but we really need an removed-python.nix
.
I don't think this should be a throw
though, mps-youtube
and python3Packages.mps-youtube
should be equivalent, and I have no reason to believe anyone used it as a module.
I would suggest the following
mps-youtube = throw "mps-youtube has moved to all-packages, and is no longer available as a python module."; | |
mps-youtube = pkgs.mps-youtube; |
but we really shouldn't be having aliases in python-packages.nix
, we'd have the same situation that created aliases.nix
in the first place.
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.
you would need to do something like mps-youtube = pkgs.mps-youtube.override { inherit python;};
otherwisei you'll get different interpreter versions.
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.
Right, so no alias or warning at all. Maybe not the best UI, but easiest for Nixpkgs maintainers. I like that.
4d0be84
to
0358141
Compare
Updated with all your comments taken into account. |
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.
please squash commits, and just make a mention in the body that the package was moved from python-modules to all-packages :)
Also move derivation from python-packages to all-packages, as this is a standalone application.
0358141
to
cc5ba54
Compare
Squashed commits. |
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.
LGTM
executable shows usage
[2 built, 7 copied (59.3 MiB), 16.9 MiB DL]
https://github.com/NixOS/nixpkgs/pull/80269
1 package built:
mps-youtube
Motivation for this change
mps-youtube-0.2.8 is no longer compatible with the version of mpv included in nixpkgs (cf this issue).
There haven't been any mps-youtube release since then, so the only way to fix it is to point at a git revision.
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)