2020-08-20 17:08:02 +00:00
|
|
|
{ lib
|
2023-07-15 17:15:38 +00:00
|
|
|
, argcomplete
|
2020-09-25 04:45:31 +00:00
|
|
|
, buildPythonPackage
|
2020-08-20 17:08:02 +00:00
|
|
|
, fetchPypi
|
|
|
|
, jq
|
2021-02-13 14:23:35 +00:00
|
|
|
, pytestCheckHook
|
2023-07-15 17:15:38 +00:00
|
|
|
, pyyaml
|
|
|
|
, setuptools-scm
|
|
|
|
, substituteAll
|
|
|
|
, tomlkit
|
|
|
|
, xmltodict
|
2020-08-20 17:08:02 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
buildPythonPackage rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "yq";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "3.4.3";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-ulhqGm8wz3BbL5IgZxLfIoHNMgKAIQ57e4Cty48lbjs=";
|
2020-09-25 04:45:31 +00:00
|
|
|
};
|
|
|
|
|
2020-12-27 14:24:52 +00:00
|
|
|
patches = [
|
|
|
|
(substituteAll {
|
|
|
|
src = ./jq-path.patch;
|
2021-02-13 14:23:35 +00:00
|
|
|
jq = "${lib.getBin jq}/bin/jq";
|
2020-12-27 14:24:52 +00:00
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2022-04-15 01:41:22 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools-scm
|
|
|
|
];
|
2020-11-15 13:44:38 +00:00
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
propagatedBuildInputs = [
|
2023-07-15 17:15:38 +00:00
|
|
|
argcomplete
|
2020-09-25 04:45:31 +00:00
|
|
|
pyyaml
|
2023-07-15 17:15:38 +00:00
|
|
|
tomlkit
|
2020-09-25 04:45:31 +00:00
|
|
|
xmltodict
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2023-11-16 04:20:00 +00:00
|
|
|
pytestCheckHook
|
2020-08-20 17:08:02 +00:00
|
|
|
];
|
|
|
|
|
2021-02-13 14:23:35 +00:00
|
|
|
pytestFlagsArray = [ "test/test.py" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
pythonImportsCheck = [ "yq" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2022-04-15 01:41:22 +00:00
|
|
|
description = "Command-line YAML/XML/TOML processor - jq wrapper for YAML, XML, TOML documents";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/kislyuk/yq";
|
2021-02-13 14:23:35 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ womfoo SuperSandro2000 ];
|
2023-11-16 04:20:00 +00:00
|
|
|
mainProgram = "yq";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|