2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
antlr4-python3-runtime,
|
|
|
|
asciimatics,
|
|
|
|
buildPythonPackage,
|
|
|
|
click,
|
|
|
|
dacite,
|
|
|
|
decorator,
|
|
|
|
fetchFromGitHub,
|
|
|
|
future,
|
|
|
|
first,
|
|
|
|
jsonpath-ng,
|
|
|
|
loguru,
|
|
|
|
overrides,
|
|
|
|
pillow,
|
|
|
|
ply,
|
|
|
|
pyfiglet,
|
|
|
|
pyperclip,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
antlr4,
|
|
|
|
pyyaml,
|
|
|
|
setuptools,
|
|
|
|
six,
|
|
|
|
urwid,
|
|
|
|
parameterized,
|
|
|
|
wcwidth,
|
|
|
|
yamale,
|
2023-02-22 10:55:15 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "python-fx";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "0.3.1";
|
2023-02-22 10:55:15 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "cielong";
|
|
|
|
repo = "pyfx";
|
|
|
|
rev = "refs/tags/v${version}";
|
2023-10-09 19:29:22 +00:00
|
|
|
hash = "sha256-BXKH3AlYMNbMREW5Qx72PrbuZdXlmVS+knWWu/y9PsA=";
|
2023-02-22 10:55:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
rm src/pyfx/model/common/jsonpath/*.{g4,interp,tokens}
|
|
|
|
antlr -Dlanguage=Python3 -visitor -o src/pyfx/model/common/jsonpath/ *.g4
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonRelaxDeps = true;
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
antlr4
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
antlr4-python3-runtime
|
|
|
|
asciimatics
|
|
|
|
click
|
|
|
|
dacite
|
|
|
|
decorator
|
|
|
|
first
|
|
|
|
future
|
|
|
|
jsonpath-ng
|
|
|
|
loguru
|
|
|
|
overrides
|
|
|
|
pillow
|
|
|
|
ply
|
|
|
|
pyfiglet
|
|
|
|
pyperclip
|
|
|
|
pyyaml
|
|
|
|
six
|
|
|
|
urwid
|
|
|
|
wcwidth
|
|
|
|
yamale
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
parameterized
|
|
|
|
];
|
|
|
|
|
|
|
|
# antlr4 issue prevents us from running the tests
|
|
|
|
# https://github.com/antlr/antlr4/issues/4041
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
# pythonImportsCheck = [
|
|
|
|
# "pyfx"
|
|
|
|
# ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Module to view JSON in a TUI";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "pyfx";
|
2023-02-22 10:55:15 +00:00
|
|
|
homepage = "https://github.com/cielong/pyfx";
|
|
|
|
changelog = "https://github.com/cielong/pyfx/releases/tag/v${version}";
|
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|