-
-
Notifications
You must be signed in to change notification settings - Fork 18.2k
plover.dev-with-plugins: init #119702
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
base: master
Are you sure you want to change the base?
plover.dev-with-plugins: init #119702
Changes from all commits
e9e1dc1
b846d83
1c92776
afe2082
e56884f
eadec59
98e65e3
125ef20
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,10 @@ | ||
| { lib, fetchurl, python27Packages, python36Packages, wmctrl, | ||
| qtbase, mkDerivationWith }: | ||
| { lib | ||
| , fetchFromGitHub | ||
| , python3Packages, python27Packages | ||
| , wmctrl, qtbase, mkDerivationWith | ||
| }: | ||
|
|
||
| { | ||
| rec { | ||
| stable = with python27Packages; buildPythonPackage rec { | ||
| pname = "plover"; | ||
| version = "3.1.1"; | ||
|
|
@@ -12,9 +15,11 @@ | |
| license = licenses.gpl2; | ||
| }; | ||
|
|
||
| src = fetchurl { | ||
| url = "https://github.com/openstenoproject/plover/archive/v${version}.tar.gz"; | ||
| sha256 = "1hdg5491phx6svrxxsxp8v6n4b25y7y4wxw7x3bxlbyhaskgj53r"; | ||
| src = fetchFromGitHub { | ||
| owner = "openstenoproject"; | ||
| repo = "plover"; | ||
| rev = "v${version}"; | ||
| sha256 = "114rlxvq471fyifwcdcgdad79ak7q3w2lk8z9nqhz1i9fg05721c"; | ||
| }; | ||
|
|
||
| nativeBuildInputs = [ setuptools_scm ]; | ||
|
|
@@ -24,32 +29,78 @@ | |
| ]; | ||
| }; | ||
|
|
||
| dev = with python36Packages; mkDerivationWith buildPythonPackage rec { | ||
| dev = with python3Packages; mkDerivationWith buildPythonPackage rec { | ||
| pname = "plover"; | ||
| version = "4.0.0.dev8"; | ||
| version = "4.0.0.dev9"; | ||
|
|
||
| meta = with lib; { | ||
| description = "OpenSteno Plover stenography software"; | ||
| maintainers = with maintainers; [ twey kovirobi ]; | ||
| license = licenses.gpl2; | ||
| license = licenses.gpl2Plus; | ||
| }; | ||
|
|
||
| src = fetchurl { | ||
| url = "https://github.com/openstenoproject/plover/archive/v${version}.tar.gz"; | ||
| sha256 = "1wxkmik1zyw5gqig5r0cas5v6f5408fbnximzw610rdisqy09rxp"; | ||
| src = fetchFromGitHub { | ||
| owner = "openstenoproject"; | ||
| repo = "plover"; | ||
| rev = "54dbcf4ea73cc1ecc1d7c70dbe7bdb13f055d101"; | ||
| sha256 = "1jm6rajlh8nm1b1331pyvp20vxxfwi4nb8wgqlkznf0kkdvfa78a"; | ||
| }; | ||
|
|
||
| # I'm not sure why we don't find PyQt5 here but there's a similar | ||
| # sed on many of the platforms Plover builds for | ||
| postPatch = "sed -i /PyQt5/d setup.cfg"; | ||
|
|
||
| checkInputs = [ pytest mock ]; | ||
| propagatedBuildInputs = [ Babel pyqt5 xlib pyserial appdirs wcwidth setuptools ]; | ||
| propagatedBuildInputs = [ | ||
| Babel pyqt5 xlib pyserial | ||
| appdirs wcwidth setuptools | ||
| certifi | ||
| ]; | ||
|
|
||
| dontWrapQtApps = true; | ||
|
|
||
| preFixup = '' | ||
| makeWrapperArgs+=("''${qtWrapperArgs[@]}") | ||
| ''; | ||
| }; | ||
|
|
||
| plugins-manager = with python3Packages; buildPythonPackage rec { | ||
| pname = "plover-plugins-manager"; | ||
| version = "0.6.1"; | ||
|
|
||
| src = fetchFromGitHub { | ||
| owner = "benoit-pierre"; | ||
| repo = "plover_plugins_manager"; | ||
| rev = version; | ||
| sha256 = "sha256-7OyGmSwOvoqwbBgXdfUUmwvjszUNRPlD4XyBeJ29vBg="; | ||
| }; | ||
|
|
||
| patches = [ ./plugins_manager.patch ]; | ||
|
||
|
|
||
| buildInputs = [ | ||
| # plover.dev | ||
| dev | ||
| ]; | ||
|
|
||
| propagatedBuildInputs = [ | ||
| pip pkginfo pygments | ||
| readme_renderer requests | ||
| requests-cache requests-futures | ||
| setuptools wheel | ||
| ]; | ||
|
|
||
| # tests try to instantiate a virtualenv and lack permission | ||
| doCheck = false; | ||
|
|
||
| meta = with lib; { | ||
| description = "OpenSteno Plover stenography software plugin manager"; | ||
| homepage = "https://github.com/benoit-pierre/plover_plugins_manager"; | ||
| license = licenses.gpl2Plus; | ||
| maintainers = with maintainers; [ evils ]; | ||
| }; | ||
| }; | ||
|
|
||
| dev-with-plugins = dev.overrideAttrs (old: { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can only echo my thoughts on #110658 that including the plugin manager is expected functionality with the dev branch of plover. It's what you'll get if you're installing plover dev with any other package manager, or the appimage, or whatever else. If anything, now that my experience with Nix has grown, I'd like to see an argument that can be overridden (to plover.dev.override {
withPluginManager = false;
}
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually, thinking further, I'm not exactly happy that the While there is the potential usecase that one would want to override the plugin manager, the way it's currently exposed gives no particularly elegant ability to do so (other than simply repeating your I'm more than happy for more brainstorming on the subject, though, I admit this probably isn't the most elegant solution but I think we need to deal with a couple of concerns, including:
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the as far as i know this would require packaging all the plugins in nixpkgs for now, setting plover.dev to include the plugin manager does seem like the right way forward unfortunately i seem to recall the issue with this PR being,
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You could probably see if it's possible to pass the site packages in an environmental variable? It would need to be the same place recognized by the plugin manager and writeable though, but the only two cases I see are:
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This can be done with I imagine something like (assuming the variable needed is makeWrapper "PATH/TO/PLOVER/EXECUTABLE" "$out/bin/plover"
--run 'mkdir -p "$HOME/PATH/TO/YOUR/SITEPACKAGES"'
--run 'export SITE_PACKAGES="$HOME/PATH/TO/YOUR/SITEPACKAGES"'would work.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Of course, you would also need the site packages that nixpkgs' At worst you could probably do some patching of plover and the plugin manager here or there to enable it.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Upon research you may be interested in the |
||
| pname = "plover-with-plugins"; | ||
| propagatedBuildInputs = old.propagatedBuildInputs ++ [ plugins-manager ]; | ||
|
|
||
| # the plugin manager installs plugins as local python packages | ||
| permitUserSite = true; | ||
| }); | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| diff --git a/plover_plugins_manager/__main__.py b/plover_plugins_manager/__main__.py | ||
| index 9e03097..6204472 100644 | ||
| --- a/plover_plugins_manager/__main__.py | ||
| +++ b/plover_plugins_manager/__main__.py | ||
| @@ -42,16 +42,7 @@ def pip(args, stdin=None, stdout=None, stderr=None, **kwargs): | ||
| 'plover_plugins_manager.pip_wrapper', | ||
| '--disable-pip-version-check'] | ||
| env = dict(os.environ) | ||
| - # Make sure user plugins are handled | ||
| - # even if user site is not enabled. | ||
| - if not running_under_virtualenv() and not site.ENABLE_USER_SITE: | ||
| - pypath = env.get('PYTHONPATH') | ||
| - if pypath is None: | ||
| - pypath = [] | ||
| - else: | ||
| - pypath = pypath.split(os.pathsep) | ||
| - pypath.insert(0, site.USER_SITE) | ||
| - env['PYTHONPATH'] = os.pathsep.join(pypath) | ||
| + env['PYTHONPATH'] = os.pathsep.join(sys.path + [site.USER_SITE]) | ||
| command = args.pop(0) | ||
| if command == 'check': | ||
| cmd.append('check') |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| { lib | ||
| , buildPythonPackage | ||
| , fetchFromGitHub | ||
| , requests | ||
| , pythonOlder | ||
| }: | ||
|
|
||
| buildPythonPackage rec { | ||
| pname = "requests-futures"; | ||
| version = "0.9.9-27-gf126048"; | ||
evils marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. From where did you get the version number?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| disabled = pythonOlder "3.3"; | ||
|
|
||
| src = fetchFromGitHub { | ||
| owner = "ross"; | ||
| repo = "requests-futures"; | ||
| rev = "f12604869b80c730192a84403f8a9b513c3f2520"; | ||
| sha256 = "0a2n4gxpv7wlp7wxjppnigbwvc36zjam97xdzk1g8xg43jb6pjhd"; | ||
| }; | ||
|
|
||
| propagatedBuildInputs = [ requests ]; | ||
|
|
||
| # tests try to access network | ||
| doCheck = false; | ||
evils marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| pythonImportsCheck = [ "requests_futures" ]; | ||
|
|
||
| meta = with lib; { | ||
| description = "Asynchronous Python HTTP Requests for Humans using Futures"; | ||
| homepage = "https://github.com/ross/requests-futures"; | ||
| license = licenses.asl20; | ||
| maintainers = with maintainers; [ evils ]; | ||
| }; | ||
| } | ||
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.
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.
nope, they're doing a moving tag of "continuous" but still have a versioning scheme that's no longer integrated with git