This repository has been archived on 2024-10-13. You can view files and clone it, but cannot push or open issues or pull requests.
nix-packages/misc/plover.nix

114 lines
3.9 KiB
Nix
Raw Normal View History

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;
2022-07-06 11:49:46 +00:00
tarballs = import ../python/tarballs.nix {inherit inputs pkgs;};
2022-06-17 14:28:28 +00:00
in rec {
2022-06-16 16:16:05 +00:00
plover-plugins-manager = with python3Packages;
buildPythonPackage rec {
2022-07-06 11:49:46 +00:00
inherit (tarballs.plover-plugins-manager-src.passthru) pname version;
src = tarballs.plover-plugins-manager-src;
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 {
2022-07-06 11:49:46 +00:00
inherit (tarballs.plover-stroke-src.passthru) pname version;
src = tarballs.plover-stroke-src;
2022-06-16 20:31:41 +00:00
checkInputs = [pytest];
};
rtf-tokenize = with python3Packages;
buildPythonPackage rec {
2022-07-06 11:49:46 +00:00
inherit (tarballs.rtf-tokenize-src.passthru) pname version;
src = tarballs.rtf-tokenize-src;
2022-06-16 20:31:41 +00:00
checkInputs = [pytest];
};
2022-06-17 09:24:01 +00:00
plover-regenpfeifer = with python3Packages;
buildPythonPackage rec {
2022-07-06 11:49:46 +00:00
inherit (tarballs.plover-regenpfeifer-src.passthru) pname version;
src = tarballs.plover-regenpfeifer-src;
propagatedBuildInputs = [plover];
};
plover-emoji = with python3Packages;
buildPythonPackage rec {
inherit (tarballs.plover-emoji-src.passthru) pname version;
src = tarballs.plover-emoji-src;
2022-07-06 12:19:44 +00:00
propagatedBuildInputs = [plover simplefuzzyset];
checkInputs = [pytest];
};
simplefuzzyset = with python3Packages;
buildPythonPackage rec {
inherit (tarballs.simplefuzzyset-src.passthru) pname version;
src = tarballs.simplefuzzyset-src;
2022-07-06 11:49:46 +00:00
};
plover-tapey-tape = with python3Packages;
buildPythonPackage rec {
inherit (tarballs.plover-tapey-tape-src.passthru) pname version;
src = tarballs.plover-tapey-tape-src;
propagatedBuildInputs = [plover];
};
plover-yaml-dictionary = with python3Packages;
buildPythonPackage rec {
inherit (tarballs.plover-yaml-dictionary-src.passthru) pname version;
src = tarballs.plover-yaml-dictionary-src;
2022-06-17 09:24:01 +00:00
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;
patches = [
./regenpfeifer.patch
];
2022-06-17 09:24:01 +00:00
nativeBuildInputs = [regenpfeifer-env];
buildPhase = ''
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[@]}")
'';
};
}