From 82cd62d977c24ccbe952c7dbf1500bdbdb00f52c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charlotte=20=F0=9F=A6=9D=20Delenk?= Date: Fri, 30 Sep 2022 14:36:15 +0100 Subject: [PATCH] add plover plugins --- default.nix | 6 ++++++ plover/plover-emoji.nix | 22 ++++++++++++++++++++++ plover/plover-machine-hid.json | 11 +++++++++++ plover/plover-machine-hid.nix | 23 +++++++++++++++++++++++ plover/plover-rkb1-hid.json | 11 +++++++++++ plover/plover-rkb1-hid.nix | 13 +++++++++++++ plover/plover-tapey-tape.nix | 21 +++++++++++++++++++++ plover/plover-yaml-dictionary.nix | 21 +++++++++++++++++++++ python/simplefuzzyset.nix | 19 +++++++++++++++++++ 9 files changed, 147 insertions(+) create mode 100644 plover/plover-emoji.nix create mode 100644 plover/plover-machine-hid.json create mode 100644 plover/plover-machine-hid.nix create mode 100644 plover/plover-rkb1-hid.json create mode 100644 plover/plover-rkb1-hid.nix create mode 100644 plover/plover-tapey-tape.nix create mode 100644 plover/plover-yaml-dictionary.nix create mode 100644 python/simplefuzzyset.nix diff --git a/default.nix b/default.nix index d86edf3..1332aed 100644 --- a/default.nix +++ b/default.nix @@ -42,4 +42,10 @@ python-rtf-tokenize = pkgs.python3Packages.callPackage ./python/rtf-tokenize.nix {}; plover = pkgs.python3Packages.callPackage ./plover/plover {}; plover-plugins-manager = pkgs.python3Packages.callPackage ./plover/plover-plugins-manager.nix {}; + python-simplefuzzyset = pkgs.python3Packages.callPackage ./python/simplefuzzyset.nix {}; + plover-plugin-emoji = pkgs.python3Packages.callPackage ./plover/plover-emoji.nix {}; + plover-plugin-tapey-tape = pkgs.python3Packages.callPackage ./plover/plover-tapey-tape.nix {}; + plover-plugin-yaml-dictionary = pkgs.python3Packages.callPackage ./plover/plover-yaml-dictionary.nix {}; + plover-plugin-machine-hid = pkgs.python3Packages.callPackage ./plover/plover-machine-hid.nix {}; + plover-plugin-rkb1-hid = pkgs.python3Packages.callPackage ./plover/plover-rkb1-hid.nix {}; } diff --git a/plover/plover-emoji.nix b/plover/plover-emoji.nix new file mode 100644 index 0000000..4b17251 --- /dev/null +++ b/plover/plover-emoji.nix @@ -0,0 +1,22 @@ +{callPackage, buildPythonPackage, fetchPypi, lib, pythonOlder}: +let plover = callPackage ./plover {}; +simplefuzzyset = callPackage ../python/simplefuzzyset.nix {}; +in buildPythonPackage rec { + pname = "plover_emoji"; + version = "0.0.4"; + src = fetchPypi { + inherit pname version; + sha256 = "sha256-22YRzSoJSFmES2P2uiA333kpxHGUV1Vlhun2q08LV+o="; + }; + + doCheck = false; + + disabled = pythonOlder "3.6"; + propagatedBuildInputs = [plover]; + + meta = with lib; { + description = "Convert text to emoji with a stroke."; + license = licenses.gpl3; + }; + passthru.updateScript = [../scripts/update-python-libraries "plover/plover-emoji.nix"]; +} \ No newline at end of file diff --git a/plover/plover-machine-hid.json b/plover/plover-machine-hid.json new file mode 100644 index 0000000..fb62666 --- /dev/null +++ b/plover/plover-machine-hid.json @@ -0,0 +1,11 @@ +{ + "url": "https://github.com/dnaq/plover-machine-hid", + "rev": "7c7ceeb1e653b8df61626a2f4739ed365c54a713", + "date": "2022-06-15T21:17:36+02:00", + "path": "/nix/store/k47dnvmm4kidi35zqyx3ihdg0ll5k0p1-plover-machine-hid", + "sha256": "12s6b8148gk3s9r8phrgsbnj81w6vn6963iq9hfjpgdw2jiv24sx", + "fetchLFS": false, + "fetchSubmodules": false, + "deepClone": false, + "leaveDotGit": false +} diff --git a/plover/plover-machine-hid.nix b/plover/plover-machine-hid.nix new file mode 100644 index 0000000..9afb2b7 --- /dev/null +++ b/plover/plover-machine-hid.nix @@ -0,0 +1,23 @@ +{callPackage, buildPythonPackage, fetchFromGitHub, lib, pythonOlder}: +let plover = callPackage ./plover {}; +source = builtins.fromJSON (builtins.readFile ./plover-machine-hid.json); +in buildPythonPackage rec { + pname = "plover_machine_hid"; + version = source.date; + src = fetchFromGitHub { + owner = "dnaq"; + repo = "plover-machine-hid"; + inherit (source) rev sha256; + }; + + doCheck = false; + + disabled = pythonOlder "3.6"; + propagatedBuildInputs = [plover]; + + meta = with lib; { + description = "POC Plover plugin and firmware for the Plover HID protocol"; + license = licenses.mit; + }; + passthru.updateScript = [../scripts/update-git.sh "https://github.com/dnaq/plover-machine-hid" "plover/plover-machine-hid.json"]; +} \ No newline at end of file diff --git a/plover/plover-rkb1-hid.json b/plover/plover-rkb1-hid.json new file mode 100644 index 0000000..dc7c7a2 --- /dev/null +++ b/plover/plover-rkb1-hid.json @@ -0,0 +1,11 @@ +{ + "url": "https://git.chir.rs/darkkirb/plover-machine-hid", + "rev": "f11d7586a993522832efed78cfa5e3654bb48258", + "date": "2022-07-27T21:41:10+01:00", + "path": "/nix/store/nil6qwsspjpq843wv8acqryp49ad47k5-plover-machine-hid", + "sha256": "12zb1q10yywmplm6rh8x4y536f3aa31vz0dnr68hqxk91vcvgswa", + "fetchLFS": false, + "fetchSubmodules": false, + "deepClone": false, + "leaveDotGit": false +} diff --git a/plover/plover-rkb1-hid.nix b/plover/plover-rkb1-hid.nix new file mode 100644 index 0000000..ea25dcf --- /dev/null +++ b/plover/plover-rkb1-hid.nix @@ -0,0 +1,13 @@ +{callPackage, fetchFromGitea}: +let source = builtins.fromJSON (builtins.readFile ./plover-rkb1-hid.json); +in +(callPackage ./plover-machine-hid.nix {}).overrideAttrs (_: { + version = source.date; + src = fetchFromGitea { + domain = "git.chir.rs"; + owner = "darkkirb"; + repo = "plover-machine-hid"; + inherit (source) rev sha256; + }; + passthru.updateScript = [../scripts/update-git.sh "https://git.chir.rs/darkkirb/plover-machine-hid" "plover/plover-rkb1-hid.json"]; +}) diff --git a/plover/plover-tapey-tape.nix b/plover/plover-tapey-tape.nix new file mode 100644 index 0000000..4990f8e --- /dev/null +++ b/plover/plover-tapey-tape.nix @@ -0,0 +1,21 @@ +{callPackage, buildPythonPackage, fetchPypi, lib, pythonOlder}: +let plover = callPackage ./plover {}; +in buildPythonPackage rec { + pname = "plover_tapey_tape"; + version = "0.0.6"; + src = fetchPypi { + inherit pname version; + sha256 = "sha256-nlSQK7lT5b2l1njmD1YZhBl0QWl9TYPRGAl4q2v17fs="; + }; + + doCheck = false; + + disabled = pythonOlder "3.6"; + propagatedBuildInputs = [plover]; + + meta = with lib; { + description = "Paper tape with extra information"; + license = licenses.gpl3; + }; + passthru.updateScript = [../scripts/update-python-libraries "plover/plover-tapey-tape.nix"]; +} \ No newline at end of file diff --git a/plover/plover-yaml-dictionary.nix b/plover/plover-yaml-dictionary.nix new file mode 100644 index 0000000..2d6b9f4 --- /dev/null +++ b/plover/plover-yaml-dictionary.nix @@ -0,0 +1,21 @@ +{callPackage, buildPythonPackage, fetchPypi, lib, pythonOlder, ruamel-yaml}: +let plover = callPackage ./plover {}; +in buildPythonPackage rec { + pname = "plover_yaml_dictionary"; + version = "0.0.1"; + src = fetchPypi { + inherit pname version; + sha256 = "sha256-Etmq1+9ek1Wa5bAjaoOwv7F2l6zXIveRz/WCBuMwI9Y="; + }; + + doCheck = false; + + disabled = pythonOlder "3.6"; + propagatedBuildInputs = [plover ruamel-yaml]; + + meta = with lib; { + description = "YAML dictionary support for Plover."; + license = licenses.gpl3Plus; + }; + passthru.updateScript = [../scripts/update-python-libraries "plover/plover-yaml-dictionary.nix"]; +} \ No newline at end of file diff --git a/python/simplefuzzyset.nix b/python/simplefuzzyset.nix new file mode 100644 index 0000000..e74a8c8 --- /dev/null +++ b/python/simplefuzzyset.nix @@ -0,0 +1,19 @@ +{callPackage, buildPythonPackage, fetchPypi, lib, pythonOlder}: +buildPythonPackage rec { + pname = "simplefuzzyset"; + version = "0.0.12"; + src = fetchPypi { + inherit pname version; + sha256 = "sha256-mhsww4tq+3bGYAvdZsHB3D2FBbCC6ePUZvYPQOi34fI="; + }; + + doCheck = false; + + disabled = pythonOlder "3.6"; + + meta = with lib; { + description = "A simpler python fuzzyset implementation."; + license = licenses.bsd3; # Unclear, author specifies OSI approved bsd license but not which + }; + passthru.updateScript = [../scripts/update-python-libraries "python/simplefuzzyset.nix"]; +} \ No newline at end of file