biome: 1.9.2 -> 1.9.3 (#349335)
[NixPkgs.git] / pkgs / development / python-modules / dragonfly / default.nix
blob072192a23b5d9021fdb6ce21d22fa7ab4f8ae592
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
5   decorator,
6   packaging,
7   pynput,
8   regex,
9   lark,
10   enum34,
11   pyperclip,
12   six,
13   requests,
14   psutil,
15   json-rpc,
16   werkzeug,
17   kaldi-active-grammar,
18   sounddevice,
19   webrtcvad,
20   setuptools,
21   xdotool,
22   wmctrl,
23   xorg,
26 buildPythonPackage rec {
27   pname = "dragonfly";
28   version = "0.35.0";
29   format = "setuptools";
31   src = fetchFromGitHub {
32     owner = "dictation-toolbox";
33     repo = pname;
34     rev = version;
35     hash = "sha256-sqEEEr5/KG3cn4rmOGJt9zMNAjeLO6h3NJgg0EyewrM=";
36   };
38   postPatch = ''
39     substituteInPlace setup.py --replace 'lark-parser == 0.8.*' 'lark'
40     substituteInPlace dragonfly/actions/keyboard/_x11_xdotool.py \
41       --replace 'xdotool = "xdotool"'${" "}'xdotool = "${xdotool}/bin/xdotool"'
42     substituteInPlace dragonfly/windows/x11_window.py \
43       --replace 'xdotool = "xdotool"'${" "}'xdotool = "${xdotool}/bin/xdotool"' \
44       --replace 'xprop = "xprop"'${" "}'xprop = "${xorg.xprop}/bin/xprop"' \
45       --replace 'wmctrl = "wmctrl"'${" "}'wmctrl = "${wmctrl}/bin/wmctrl"'
46   '';
48   propagatedBuildInputs = [
49     decorator
50     packaging
51     pynput
52     regex
53     lark
54     enum34
55     pyperclip
56     six
57     requests
58     psutil
59     json-rpc
60     werkzeug
61     kaldi-active-grammar # for the Kaldi engine
62     sounddevice
63     webrtcvad
64     setuptools # needs pkg_resources at runtime
65   ];
67   # Too many tests fail because of the unusual environment or
68   # because of the missing dependencies for some of the engines.
69   doCheck = false;
71   pythonImportsCheck = [ "dragonfly" ];
73   meta = with lib; {
74     description = "Speech recognition framework allowing powerful Python-based scripting";
75     homepage = "https://github.com/dictation-toolbox/dragonfly";
76     license = licenses.lgpl3Plus;
77     maintainers = [ ];
78   };