nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 100 lines 2.1 kB view raw
1{ 2 lib, 3 stdenv, 4 antlr4-python3-runtime, 5 asciimatics, 6 buildPythonPackage, 7 click, 8 dacite, 9 decorator, 10 fetchFromGitHub, 11 first, 12 jsonpath-ng, 13 loguru, 14 overrides, 15 pillow, 16 ply, 17 pyfiglet, 18 pyperclip, 19 pytestCheckHook, 20 antlr4, 21 pyyaml, 22 setuptools, 23 urwid, 24 parameterized, 25 wcwidth, 26 yamale, 27}: 28 29buildPythonPackage rec { 30 pname = "python-fx"; 31 version = "0.3.2"; 32 pyproject = true; 33 34 src = fetchFromGitHub { 35 owner = "cielong"; 36 repo = "pyfx"; 37 tag = "v${version}"; 38 hash = "sha256-Q5ihWnoa7nf4EkrY4SgrwjaNvTva4RdW9GRbnbsPXPc="; 39 }; 40 41 postPatch = '' 42 rm src/pyfx/model/common/jsonpath/*.py # upstream checks in generated files, remove to ensure they were regenerated 43 antlr -Dlanguage=Python3 -visitor src/pyfx/model/common/jsonpath/*.g4 44 rm src/pyfx/model/common/jsonpath/*.{g4,interp,tokens} # no need to install 45 46 # https://github.com/cielong/pyfx/pull/148 47 substituteInPlace src/pyfx/view/common/frame.py \ 48 --replace-fail "self.__super.__init__()" "super().__init__()" 49 ''; 50 51 pythonRelaxDeps = true; 52 53 build-system = [ setuptools ]; 54 55 nativeBuildInputs = [ antlr4 ]; 56 57 dependencies = [ 58 antlr4-python3-runtime 59 asciimatics 60 click 61 dacite 62 decorator 63 first 64 jsonpath-ng 65 loguru 66 overrides 67 pillow 68 ply 69 pyfiglet 70 pyperclip 71 pyyaml 72 urwid 73 wcwidth 74 yamale 75 ]; 76 77 nativeCheckInputs = [ 78 pytestCheckHook 79 parameterized 80 ]; 81 82 # FAILED tests/test_event_loops.py::TwistedEventLoopTest::test_run - AssertionError: 'callback called with future outcome: True' not found in ['... 83 doCheck = !stdenv.hostPlatform.isDarwin; 84 85 pythonImportsCheck = [ "pyfx" ]; 86 87 disabledTests = [ 88 # TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 89 "test_start" 90 ]; 91 92 meta = { 93 description = "Module to view JSON in a TUI"; 94 homepage = "https://github.com/cielong/pyfx"; 95 changelog = "https://github.com/cielong/pyfx/releases/tag/${src.tag}"; 96 license = lib.licenses.mit; 97 maintainers = with lib.maintainers; [ fab ]; 98 mainProgram = "pyfx"; 99 }; 100}