2021-01-25 08:26:54 +00:00
|
|
|
{ lib
|
2020-02-07 12:03:39 +00:00
|
|
|
, buildPythonPackage
|
2020-05-10 13:41:44 +00:00
|
|
|
, fetchFromGitHub
|
2021-11-01 20:59:40 +00:00
|
|
|
, ruamel-yaml
|
2020-02-07 12:03:39 +00:00
|
|
|
, xmltodict
|
2020-05-04 08:01:00 +00:00
|
|
|
, pygments
|
2021-01-09 13:33:44 +00:00
|
|
|
, pytestCheckHook
|
2021-07-23 03:29:22 +00:00
|
|
|
, pythonOlder
|
2020-02-07 12:03:39 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "jc";
|
2023-01-13 13:21:40 +00:00
|
|
|
version = "1.22.5";
|
2021-07-23 03:29:22 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
2020-02-07 12:03:39 +00:00
|
|
|
|
2020-05-10 13:41:44 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "kellyjonbrazil";
|
2021-07-23 03:29:22 +00:00
|
|
|
repo = pname;
|
2022-09-28 00:35:51 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-01-13 13:21:40 +00:00
|
|
|
sha256 = "sha256-ktK/s9Tt1XNIiW/Ztn4znsPXIMrScB4KAS027YqxIVM=";
|
2020-02-07 12:03:39 +00:00
|
|
|
};
|
|
|
|
|
2021-11-01 20:59:40 +00:00
|
|
|
propagatedBuildInputs = [ ruamel-yaml xmltodict pygments ];
|
2020-02-07 12:03:39 +00:00
|
|
|
|
2023-01-21 12:00:00 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2021-01-09 13:33:44 +00:00
|
|
|
|
2021-07-23 03:29:22 +00:00
|
|
|
pythonImportsCheck = [ "jc" ];
|
|
|
|
|
|
|
|
# tests require timezone to set America/Los_Angeles
|
|
|
|
doCheck = false;
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-10-11 05:55:05 +00:00
|
|
|
description = "This tool serializes the output of popular command line tools and filetypes to structured JSON output";
|
2020-02-07 12:03:39 +00:00
|
|
|
homepage = "https://github.com/kellyjonbrazil/jc";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ atemu ];
|
2022-11-09 15:41:13 +00:00
|
|
|
changelog = "https://github.com/kellyjonbrazil/jc/blob/v${version}/CHANGELOG";
|
2020-02-07 12:03:39 +00:00
|
|
|
};
|
|
|
|
}
|