Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 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, 24}: 25 26buildPythonPackage rec { 27 pname = "dragonfly"; 28 version = "0.35.0"; 29 format = "setuptools"; 30 31 src = fetchFromGitHub { 32 owner = "dictation-toolbox"; 33 repo = pname; 34 rev = version; 35 hash = "sha256-sqEEEr5/KG3cn4rmOGJt9zMNAjeLO6h3NJgg0EyewrM="; 36 }; 37 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 ''; 47 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 ]; 66 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; 70 71 pythonImportsCheck = [ "dragonfly" ]; 72 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 }; 79}