2022-06-16 16:16:05 +00:00
|
|
|
{
|
|
|
|
inputs,
|
|
|
|
pkgs,
|
|
|
|
}:
|
2022-06-17 14:28:28 +00:00
|
|
|
with pkgs; let
|
|
|
|
inherit (inputs.nixpkgs-stable.legacyPackages.${system}) pypy3;
|
|
|
|
in rec {
|
2022-06-16 16:16:05 +00:00
|
|
|
plover-plugins-manager = with python3Packages;
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "plover-plugins-manager";
|
|
|
|
version = "0.7.0";
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "benoit-pierre";
|
|
|
|
repo = "plover_plugins_manager";
|
|
|
|
rev = "0.7.0";
|
|
|
|
sha256 = "sha256-+ASEFxjIeqOwwIwojOltA4nAG/HMz+px+wMXuCOc+Dw=";
|
|
|
|
};
|
2022-06-16 20:40:28 +00:00
|
|
|
propagatedBuildInputs = [pip pkginfo plover pygments readme_renderer requests requests-cache requests-futures setuptools wheel];
|
2022-06-16 20:42:08 +00:00
|
|
|
installCheckPhase = "true";
|
2022-06-16 20:52:29 +00:00
|
|
|
setuptoolsCheckPhase = "true";
|
2022-06-16 16:16:05 +00:00
|
|
|
};
|
2022-06-16 20:31:41 +00:00
|
|
|
plover-stroke = with python3Packages;
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "plover-stroke";
|
|
|
|
version = "1.1.0";
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "benoit-pierre";
|
|
|
|
repo = "plover_plugin_manager";
|
|
|
|
rev = "1.1.0";
|
|
|
|
sha256 = "sha256-A75OMzmEn0VmDAvmQCp6/7uptxzwWJTwsih3kWlYioA=";
|
|
|
|
};
|
|
|
|
checkInputs = [pytest];
|
|
|
|
};
|
|
|
|
rtf-tokenize = with python3Packages;
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "rtf-tokenize";
|
|
|
|
version = "1.0.0";
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "benoit-pierre";
|
|
|
|
repo = "rtf_tokenize";
|
|
|
|
rev = "1.0.0";
|
|
|
|
sha256 = "sha256-zwD2sRYTY1Kmm/Ag2hps9VRdUyQoi4zKtDPR+F52t9A=";
|
|
|
|
};
|
|
|
|
checkInputs = [pytest];
|
|
|
|
};
|
2022-06-17 09:24:01 +00:00
|
|
|
plover-regenpfeifer = with python3Packages;
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "plover_regenpfeifer";
|
|
|
|
version = "0.0.3";
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mkrnr";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "sha256-2KzVz8zsrRPU4zjlzyPYfBCWppfy73+nrT5RUKU/670=";
|
|
|
|
};
|
|
|
|
propagatedBuildInputs = [plover];
|
|
|
|
};
|
2022-06-17 20:02:45 +00:00
|
|
|
regenpfeifer-env = pypy3.withPackages (ps: [ps.marisa-trie]);
|
2022-06-17 09:24:01 +00:00
|
|
|
wortformliste = pkgs.stdenvNoCC.mkDerivation {
|
|
|
|
pname = "wortformliste";
|
|
|
|
version = inputs.wortformliste.lastModifiedDate;
|
|
|
|
src = inputs.wortformliste;
|
|
|
|
|
|
|
|
buildPhase = "true";
|
|
|
|
installPhase = "cp wortformliste.csv $out";
|
|
|
|
};
|
2022-06-18 09:05:53 +00:00
|
|
|
regenpfeifer = pkgs.stdenvNoCC.mkDerivation rec {
|
2022-06-17 09:24:01 +00:00
|
|
|
pname = "regenpfeifer";
|
|
|
|
version = inputs.regenpfeifer.lastModifiedDate;
|
2022-06-18 09:05:53 +00:00
|
|
|
name = "${pname}-${version}.json";
|
2022-06-17 09:24:01 +00:00
|
|
|
src = inputs.regenpfeifer;
|
2022-06-17 19:27:31 +00:00
|
|
|
patches = [
|
|
|
|
./regenpfeifer.patch
|
|
|
|
];
|
2022-06-17 09:24:01 +00:00
|
|
|
nativeBuildInputs = [regenpfeifer-env];
|
|
|
|
buildPhase = ''
|
2022-06-17 19:27:31 +00:00
|
|
|
PYTHONPATH=${regenpfeifer-env}/site-packages LC_ALL=C.UTF-8 pypy3 -m regenpfeifer.dictionary_generator ${wortformliste} $out unmatched.log 0 0
|
2022-06-17 09:24:01 +00:00
|
|
|
'';
|
2022-06-17 20:02:45 +00:00
|
|
|
installPhase = "true";
|
2022-06-17 09:24:01 +00:00
|
|
|
};
|
2022-06-16 16:16:05 +00:00
|
|
|
plover = with python3Packages;
|
|
|
|
qt5.mkDerivationWith buildPythonPackage rec {
|
|
|
|
pname = "plover";
|
|
|
|
version = inputs.plover.lastModifiedDate;
|
|
|
|
|
|
|
|
src = inputs.plover;
|
|
|
|
|
|
|
|
# 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
|
2022-06-28 08:51:16 +00:00
|
|
|
postPatch = ''
|
|
|
|
sed -i /PyQt5/d setup.cfg
|
|
|
|
sed -i 's/pywayland==0.4.11/pywayland>=0.4.11/' reqs/constraints.txt
|
|
|
|
substituteInPlace plover_build_utils/setup.py \
|
|
|
|
--replace "/usr/share/wayland/wayland.xml" "${wayland}/share/wayland/wayland.xml"
|
|
|
|
'';
|
2022-06-16 16:16:05 +00:00
|
|
|
|
|
|
|
checkInputs = [pytest mock];
|
2022-06-28 08:51:16 +00:00
|
|
|
propagatedBuildInputs = [babel pyqt5 xlib pyserial appdirs wcwidth setuptools plover-stroke rtf-tokenize pywayland xkbcommon];
|
|
|
|
nativeBuildInputs = [
|
|
|
|
wayland
|
|
|
|
pkg-config
|
|
|
|
];
|
2022-06-16 16:16:05 +00:00
|
|
|
|
2022-06-16 20:36:09 +00:00
|
|
|
installCheckPhase = "true";
|
|
|
|
|
2022-06-16 16:16:05 +00:00
|
|
|
dontWrapQtApps = true;
|
|
|
|
|
|
|
|
preFixup = ''
|
|
|
|
makeWrapperArgs+=("''${qtWrapperArgs[@]}")
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|