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
37 changes: 0 additions & 37 deletions pkgs/applications/misc/plover/default.nix

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
lib,
fetchPypi,
python3Packages,
plover,
setuptools,
pythonImportsCheckHook,
}:
python3Packages.buildPythonPackage rec {
pname = "plover-last-translation";
version = "0.0.2";
pyproject = true;
build-system = [ setuptools ];

meta = with lib; {
description = "Macro plugins for Plover to repeat output";
maintainers = with maintainers; [ twey ];
license = licenses.gpl2Plus;
};

src = fetchPypi {
pname = "plover_last_translation";
inherit version;
hash = "sha256-lmgjbuwdqZ8eeU4m/d1akFwwj5CmliEaLmXEKAubjdk=";
};

nativeCheckInputs = [
pythonImportsCheckHook
];

propagatedBuildInputs = [ plover ];
}
24 changes: 24 additions & 0 deletions pkgs/development/python-modules/plover-stroke/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
lib,
fetchPypi,
python3Packages,
setuptools,
}:
python3Packages.buildPythonPackage rec {
pname = "plover-stroke";
version = "1.1.0";
pyproject = true;
build-system = [ setuptools ];

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=";
};
}
80 changes: 80 additions & 0 deletions pkgs/development/python-modules/plover/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
{
stdenv,
lib,
fetchFromGitHub,
wmctrl,
python3Packages,
buildPythonPackage,
pytest,
mock,
babel,
pyqt5,
xlib,
pyserial,
appdirs,
wcwidth,
setuptools,
rtf-tokenize,
plover-stroke,
wrapQtAppsHook,
}:
let
plover = python3Packages.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;
};

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
];
nativeBuildInputs = [ wrapQtAppsHook ];
propagatedBuildInputs = [
babel
pyqt5
xlib
pyserial
appdirs
wcwidth
setuptools
rtf-tokenize
plover-stroke
];

preFixup = ''
makeWrapperArgs+=("''${qtWrapperArgs[@]}")
'';
};

plugins = lib.attrsets.mapAttrs' (name: value: {
name = builtins.substring 7 (builtins.stringLength name) name;
inherit value;
}) (lib.attrsets.filterAttrs (k: v: lib.strings.hasPrefix "plover-" k) python3Packages);
in
plover
// {
inherit plugins;
withPlugins = ps: python3Packages.python.withPackages (_: ps plugins);
}
21 changes: 21 additions & 0 deletions pkgs/development/python-modules/rtf-tokenize/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
lib,
fetchPypi,
python3Packages,
}:
python3Packages.buildPythonPackage rec {
pname = "rtf-tokenize";
version = "1.0.0";

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 = python3Packages.plover;

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

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

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

plover = callPackage ../development/python-modules/plover {
inherit (pkgs.libsForQt5) wrapQtAppsHook;
};

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

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 +13845,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