1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, ruamel-yaml
5, xmltodict
6, pygments
7, pytestCheckHook
8, pythonOlder
9}:
10
11buildPythonPackage rec {
12 pname = "jc";
13 version = "1.23.2";
14 disabled = pythonOlder "3.6";
15
16 src = fetchFromGitHub {
17 owner = "kellyjonbrazil";
18 repo = pname;
19 rev = "refs/tags/v${version}";
20 hash = "sha256-nj7HyYjo5jDnA+H5/er/GPgC/bUR0UYBqu5zOSDA4p0=";
21 };
22
23 propagatedBuildInputs = [ ruamel-yaml xmltodict pygments ];
24
25 nativeCheckInputs = [ pytestCheckHook ];
26
27 pythonImportsCheck = [ "jc" ];
28
29 # tests require timezone to set America/Los_Angeles
30 doCheck = false;
31
32 meta = with lib; {
33 description = "This tool serializes the output of popular command line tools and filetypes to structured JSON output";
34 homepage = "https://github.com/kellyjonbrazil/jc";
35 license = licenses.mit;
36 maintainers = with maintainers; [ atemu ];
37 changelog = "https://github.com/kellyjonbrazil/jc/blob/v${version}/CHANGELOG";
38 };
39}