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";
|
2023-07-15 17:15:38 +00:00
|
|
|
version = "3.2.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-07-15 17:15:38 +00:00
|
|
|
hash = "sha256-jbt6DJN92/w90XXmR49AlgwUDT6LHxoDFd52OE1mZQo=";
|
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 = [
|
2021-02-13 14:23:35 +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 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|