Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 49 additions & 33 deletions pkgs/applications/misc/plover/default.nix
Original file line number Diff line number Diff line change
@@ -1,37 +1,53 @@
{ lib, fetchFromGitHub, python3Packages, wmctrl, qtbase, mkDerivationWith }:

{
stable = throw "plover.stable was removed because it used Python 2. Use plover.dev instead."; # added 2022-06-05

dev = with python3Packages; mkDerivationWith buildPythonPackage rec {
pname = "plover";
version = "4.0.0.dev10";

meta = with lib; {
broken = stdenv.hostPlatform.isDarwin;
description = "OpenSteno Plover stenography software";
maintainers = with maintainers; [ twey kovirobi ];
license = licenses.gpl2;
};

src = fetchFromGitHub {
owner = "openstenoproject";
repo = "plover";
rev = "v${version}";
sha256 = "sha256-oJ7+R3ZWhUbNTTAw1AfMg2ur8vW1XEbsa5FgSTam1Ns=";
};

# 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";

nativeCheckInputs = [ pytest mock ];
propagatedBuildInputs = [ babel pyqt5 xlib pyserial appdirs wcwidth setuptools ];

dontWrapQtApps = true;
stdenv,
lib,
fetchFromGitHub,
python3Packages,
mkDerivationWith,
}:
with python3Packages; mkDerivationWith buildPythonPackage rec {
pname = "plover";
version = "4.0.0rc2";
pyproject = true;
build-system = [ setuptools ];

meta = with lib; {
broken = stdenv.hostPlatform.isDarwin;
description = "OpenSteno Plover stenography software";
maintainers = with maintainers; [
twey
kovirobi
];
license = licenses.gpl2;
};

preFixup = ''
makeWrapperArgs+=("''${qtWrapperArgs[@]}")
'';
src = fetchFromGitHub {
owner = "openstenoproject";
repo = pname;
rev = "v${version}";
sha256 = "sha256-rmMec/BbvOJ92u8Tmp3Kv2YezzJxB/L8UrDntTDSKj4=";
};

# 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";

nativeCheckInputs = [
pytest
mock
];
propagatedBuildInputs = [
babel
pyqt5
xlib
pyserial
appdirs
wcwidth
rtf-tokenize
plover-stroke
];

preFixup = ''
makeWrapperArgs+=("''${qtWrapperArgs[@]}")
'';
}
31 changes: 31 additions & 0 deletions pkgs/development/python-modules/plover-stroke/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
lib,
fetchPypi,
python3Packages,
setuptools,
pythonImportsCheckHook,
pytestCheckHook,
}:
python3Packages.buildPythonPackage rec {
pname = "plover-stroke";
version = "1.1.0";
pyproject = true;
build-system = [ setuptools ];

nativeCheckInputs = [
pythonImportsCheckHook
pytestCheckHook
];

meta = with lib; {
description = "Helper class for working with steno strokes";
maintainers = with maintainers; [ twey ];
license = licenses.gpl2Plus;
};

src = fetchPypi {
pname = "plover_stroke";
inherit version;
hash = "sha256-3gOyP0ruZrZfaffU7MQjNoG0NUFQLYa/FP3inqpy0VM=";
};
}
31 changes: 31 additions & 0 deletions pkgs/development/python-modules/rtf-tokenize/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
lib,
fetchPypi,
python3Packages,
setuptools,
pythonImportsCheckHook,
pytestCheckHook,
}:
python3Packages.buildPythonPackage rec {
pname = "rtf-tokenize";
version = "1.0.0";
pyproject = true;
build-system = [ setuptools ];

nativeCheckInputs = [
pythonImportsCheckHook
pytestCheckHook
];

meta = with lib; {
description = "A simple RTF tokenizer";
maintainers = with maintainers; [ twey ];
license = licenses.gpl2Plus;
};

src = fetchPypi {
pname = "rtf_tokenize";
inherit version;
hash = "sha256-XD3zkNAEeb12N8gjv81v37Id3RuWroFUY95+HtOS1gg=";
};
}
2 changes: 1 addition & 1 deletion pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -31986,7 +31986,7 @@ with pkgs;

plex-mpv-shim = python3Packages.callPackage ../applications/video/plex-mpv-shim { };

plover = recurseIntoAttrs (libsForQt5.callPackage ../applications/misc/plover { });
plover = libsForQt5.callPackage ../applications/misc/plover { };

plugdata = callPackage ../applications/audio/plugdata { };

Expand Down
4 changes: 4 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9892,6 +9892,8 @@ self: super: with self; {

pkg-about = callPackage ../development/python-modules/pkg-about { };

plover-stroke = callPackage ../development/python-modules/plover-stroke { };

micloud = callPackage ../development/python-modules/micloud { };

mqtt2influxdb = callPackage ../development/python-modules/mqtt2influxdb { };
Expand Down Expand Up @@ -13837,6 +13839,8 @@ self: super: with self; {

rstr = callPackage ../development/python-modules/rstr { };

rtf-tokenize = callPackage ../development/python-modules/rtf-tokenize { };

rtmidi-python = callPackage ../development/python-modules/rtmidi-python {
inherit (pkgs.darwin.apple_sdk.frameworks) CoreAudio CoreMIDI CoreServices;
};
Expand Down