2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
2020-05-15 21:57:56 +00:00
|
|
|
, fetchFromGitHub
|
2021-12-06 16:07:01 +00:00
|
|
|
, ruamel-yaml
|
2020-04-24 23:36:52 +00:00
|
|
|
, xmltodict
|
2020-05-15 21:57:56 +00:00
|
|
|
, pygments
|
2021-01-09 10:05:03 +00:00
|
|
|
, pytestCheckHook
|
2021-08-05 21:33:18 +00:00
|
|
|
, pythonOlder
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "jc";
|
2023-01-11 07:51:40 +00:00
|
|
|
version = "1.22.4";
|
2021-08-05 21:33:18 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-05-15 21:57:56 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "kellyjonbrazil";
|
2021-08-05 21:33:18 +00:00
|
|
|
repo = pname;
|
2022-09-30 11:47:45 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-01-11 07:51:40 +00:00
|
|
|
sha256 = "sha256-8uL+n9eQmGVtQmwYqUr/368IqQ1RLJGBLMlY9eAqUa4=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
propagatedBuildInputs = [ ruamel-yaml xmltodict pygments ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-09 10:05:03 +00:00
|
|
|
checkInputs = [ pytestCheckHook ];
|
|
|
|
|
2021-08-05 21:33:18 +00:00
|
|
|
pythonImportsCheck = [ "jc" ];
|
|
|
|
|
|
|
|
# tests require timezone to set America/Los_Angeles
|
|
|
|
doCheck = false;
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-10-19 00:13:06 +00:00
|
|
|
description = "This tool serializes the output of popular command line tools and filetypes to structured JSON output";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/kellyjonbrazil/jc";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ atemu ];
|
2022-11-21 17:40:18 +00:00
|
|
|
changelog = "https://github.com/kellyjonbrazil/jc/blob/v${version}/CHANGELOG";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|