-
-
Notifications
You must be signed in to change notification settings - Fork 19.4k
plover: unbork and move to by-name #419593
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
Changes from all commits
ae4b98e
ea42b3b
8fa8ff3
7a4aa60
5f4267b
085f919
951aac3
7d49c83
7df9093
30c4646
77975a4
364c7e0
8a6898f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| { | ||
| lib, | ||
| fetchFromGitHub, | ||
| writeShellScriptBin, | ||
| plover, | ||
| python3Packages, | ||
| pkginfo, | ||
| packaging, | ||
| psutil, | ||
| pygments, | ||
| readme-renderer, | ||
| requests-cache, | ||
| requests-futures, | ||
| # Qt | ||
| pyqt, | ||
| qtbase, | ||
| wrapQtAppsHook, | ||
| }: | ||
|
|
||
| (plover.override { | ||
| inherit wrapQtAppsHook pyqt; | ||
| }).overridePythonAttrs | ||
| (oldAttrs: rec { | ||
| version = "5.0.0.dev2"; | ||
|
|
||
| src = fetchFromGitHub { | ||
| owner = "openstenoproject"; | ||
| repo = "plover"; | ||
| tag = "v${version}"; | ||
| hash = "sha256-PZwxVrdQPhgbj+YmWZIUETngeJGs6IQty0hY43tLQO0="; | ||
| }; | ||
|
|
||
| # pythonRelaxDeps seemingly doesn't work here | ||
| postPatch = oldAttrs.postPatch + '' | ||
| sed -i /PySide6-Essentials/d pyproject.toml | ||
| ''; | ||
|
|
||
| build-system = oldAttrs.build-system ++ [ | ||
| # Replacement for missing pyside6-essentials tools, | ||
| # workaround for https://github.com/NixOS/nixpkgs/issues/277849. | ||
| # Ideally this would be solved in pyside6 itself but I spent four | ||
| # hours trying to untangle its build system before giving up. If | ||
| # anyone wants to spend the time fixing it feel free to request | ||
| # me (@Pandapip1) as a reviewer. | ||
| (writeShellScriptBin "pyside6-uic" '' | ||
| exec ${qtbase}/libexec/uic -g python "$@" | ||
| '') | ||
| (writeShellScriptBin "pyside6-rcc" '' | ||
| exec ${qtbase}/libexec/rcc -g python "$@" | ||
| '') | ||
| ]; | ||
|
|
||
| dependencies = | ||
| oldAttrs.dependencies | ||
| ++ [ | ||
| packaging | ||
| pkginfo | ||
| psutil | ||
| pygments | ||
| qtbase | ||
| readme-renderer | ||
| requests-cache | ||
| requests-futures | ||
| ] | ||
| ++ readme-renderer.optional-dependencies.md; | ||
|
|
||
| meta.description = oldAttrs.meta.description + " (Development version)"; | ||
| }) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| { | ||
| lib, | ||
| buildPythonPackage, | ||
| fetchFromGitHub, | ||
| setuptools, | ||
| pytestCheckHook, | ||
| pytest-qt, | ||
| pyside6, | ||
| }: | ||
|
|
||
| buildPythonPackage rec { | ||
| pname = "plover-stroke"; | ||
| version = "1.1.0"; | ||
| pyproject = true; | ||
|
|
||
| src = fetchFromGitHub { | ||
| owner = "openstenoproject"; | ||
| repo = "plover_stroke"; | ||
| tag = version; | ||
| hash = "sha256-A75OMzmEn0VmDAvmQCp6/7uptxzwWJTwsih3kWlYioA="; | ||
| }; | ||
|
|
||
| build-system = [ setuptools ]; | ||
|
|
||
| nativeCheckInputs = [ | ||
| pytestCheckHook | ||
| pytest-qt | ||
| pyside6 | ||
| ]; | ||
|
|
||
| pythonImportsCheck = [ "plover_stroke" ]; | ||
|
|
||
| meta = { | ||
| description = "Helper class for working with steno strokes"; | ||
| homepage = "https://github.com/openstenoproject/plover_stroke"; | ||
| license = lib.licenses.gpl2Plus; # https://github.com/openstenoproject/plover_stroke/issues/4 | ||
| maintainers = with lib.maintainers; [ pandapip1 ]; | ||
| }; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,96 @@ | ||
| { | ||
| lib, | ||
| config, | ||
| stdenv, | ||
| plover, | ||
| buildPythonPackage, | ||
| fetchFromGitHub, | ||
| fetchpatch, | ||
| versionCheckHook, | ||
| appdirs, | ||
| babel, | ||
| evdev, | ||
| mock, | ||
| pyserial, | ||
| pytestCheckHook, | ||
| pytest-qt, | ||
| plover-stroke, | ||
| rtf-tokenize, | ||
| setuptools, | ||
| wcwidth, | ||
| wheel, | ||
| xlib, | ||
| # Qt dependencies | ||
| pyqt, | ||
| wrapQtAppsHook, | ||
| }: | ||
|
|
||
| buildPythonPackage rec { | ||
| pname = "plover"; | ||
| version = "4.0.2"; | ||
| pyproject = true; | ||
|
|
||
| src = fetchFromGitHub { | ||
| owner = "openstenoproject"; | ||
| repo = "plover"; | ||
| tag = "v${version}"; | ||
| hash = "sha256-VpQT25bl8yPG4J9IwLkhSkBt31Y8BgPJdwa88WlreA8="; | ||
| }; | ||
|
|
||
| postPatch = '' | ||
| sed -i 's/,<77//g' pyproject.toml # pythonRelaxDepsHook doesn't work for this for some reason | ||
| ''; | ||
|
|
||
| build-system = [ | ||
| babel | ||
| setuptools | ||
| pyqt | ||
| wheel | ||
| ]; | ||
| dependencies = [ | ||
| appdirs | ||
| evdev | ||
| pyqt | ||
| pyserial | ||
| plover-stroke | ||
| rtf-tokenize | ||
| setuptools | ||
| wcwidth | ||
| xlib | ||
| ]; | ||
| nativeBuildInputs = [ | ||
| wrapQtAppsHook | ||
| ]; | ||
|
|
||
| nativeCheckInputs = [ | ||
| pytestCheckHook | ||
| versionCheckHook | ||
| pytest-qt | ||
| mock | ||
| ]; | ||
|
|
||
| # Segfaults?! | ||
| disabledTestPaths = [ "test/gui_qt/test_dictionaries_widget.py" ]; | ||
|
|
||
| preFixup = '' | ||
| makeWrapperArgs+=("''${qtWrapperArgs[@]}") | ||
| ''; | ||
|
|
||
| dontWrapQtApps = true; | ||
|
|
||
| pythonImportsCheck = [ "plover" ]; | ||
|
|
||
| meta = { | ||
| description = "OpenSteno Plover stenography software"; | ||
| homepage = "https://www.openstenoproject.org/plover/"; | ||
| mainProgram = "plover"; | ||
| maintainers = with lib.maintainers; [ | ||
| twey | ||
| kovirobi | ||
| pandapip1 | ||
| ]; | ||
| license = lib.licenses.gpl2Plus; | ||
| platforms = lib.platforms.unix; | ||
| broken = stdenv.hostPlatform.isDarwin; | ||
| }; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| { | ||
| lib, | ||
| buildPythonPackage, | ||
| fetchFromGitHub, | ||
| setuptools, | ||
| pytestCheckHook, | ||
| }: | ||
|
|
||
| buildPythonPackage rec { | ||
| pname = "rtf-tokenize"; | ||
| version = "1.0.0"; | ||
| pyproject = true; | ||
|
|
||
| src = fetchFromGitHub { | ||
| owner = "openstenoproject"; | ||
| repo = "rtf_tokenize"; | ||
| tag = version; | ||
| hash = "sha256-zwD2sRYTY1Kmm/Ag2hps9VRdUyQoi4zKtDPR+F52t9A="; | ||
| }; | ||
|
|
||
| build-system = [ setuptools ]; | ||
|
|
||
| nativeCheckInputs = [ pytestCheckHook ]; | ||
|
|
||
| pythonImportsCheck = [ "rtf_tokenize" ]; | ||
|
|
||
| meta = { | ||
| description = "Simple RTF tokenizer package for Python"; | ||
| homepage = "https://github.com/openstenoproject/rtf_tokenize"; | ||
| license = lib.licenses.gpl2Plus; # https://github.com/openstenoproject/rtf_tokenize/issues/1 | ||
| maintainers = with lib.maintainers; [ pandapip1 ]; | ||
| }; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12344,6 +12344,18 @@ self: super: with self; { | |
|
|
||
| plotpy = callPackage ../development/python-modules/plotpy { }; | ||
|
|
||
| plover = callPackage ../development/python-modules/plover { | ||
| inherit (pkgs.libsForQt5) wrapQtAppsHook; | ||
| pyqt = self.pyqt5; | ||
|
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.
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. Now I see why you add the I'm going to consult Python/by-name people about this pattern. |
||
| }; | ||
|
|
||
| plover-dev = callPackage ../development/python-modules/plover-dev { | ||
| inherit (pkgs.qt6) wrapQtAppsHook qtbase; | ||
| pyqt = self.pyside6; | ||
| }; | ||
|
|
||
| plover-stroke = callPackage ../development/python-modules/plover-stroke { }; | ||
|
|
||
| pluggy = callPackage ../development/python-modules/pluggy { }; | ||
|
|
||
| pluginbase = callPackage ../development/python-modules/pluginbase { }; | ||
|
|
@@ -16723,6 +16735,8 @@ self: super: with self; { | |
|
|
||
| rtb-data = callPackage ../development/python-modules/rtb-data { }; | ||
|
|
||
| rtf-tokenize = callPackage ../development/python-modules/rtf-tokenize { }; | ||
|
|
||
| rtfde = callPackage ../development/python-modules/rtfde { }; | ||
|
|
||
| rtfunicode = callPackage ../development/python-modules/rtfunicode { }; | ||
|
|
||
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.
For the "move to by-name" part of this PR, we could create a reference under
pkgs/by-namewith thepython3Packages.toPythonApplicationfunction.Still, we need to think about how to handle backward compatibility. We may want
pkgs.ploverto be the Python application ofpython3Packages.plover, butploverused to be a set containingplover.stableandplover.dev. We might need someconfig.allowAliasestricks underpkgs.plover.passthruto expose the deprecatedplover.stableandplover.dev.This is not a blocker. Thank you for fixing plover, and I look forward to its merge!