2020-08-20 17:08:02 +00:00
|
|
|
{ lib
|
2020-09-25 04:45:31 +00:00
|
|
|
, buildPythonPackage
|
2020-08-20 17:08:02 +00:00
|
|
|
, fetchPypi
|
2020-12-27 14:24:52 +00:00
|
|
|
, substituteAll
|
2020-08-20 17:08:02 +00:00
|
|
|
, argcomplete
|
|
|
|
, pyyaml
|
2022-04-15 01:41:22 +00:00
|
|
|
, toml
|
2020-08-20 17:08:02 +00:00
|
|
|
, xmltodict
|
|
|
|
, jq
|
2022-04-15 01:41:22 +00:00
|
|
|
, setuptools-scm
|
2021-02-13 14:23:35 +00:00
|
|
|
, pytestCheckHook
|
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";
|
2022-08-12 12:06:08 +00:00
|
|
|
version = "3.1.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-08-12 12:06:08 +00:00
|
|
|
sha256 = "sha256-MKhKoiSGx0m6JpJWvVhsC803C34qcedsOSTq1IZ+dPI=";
|
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 = [
|
|
|
|
pyyaml
|
|
|
|
xmltodict
|
2022-04-15 01:41:22 +00:00
|
|
|
toml
|
2020-09-25 04:45:31 +00:00
|
|
|
argcomplete
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-08-20 17:08:02 +00:00
|
|
|
checkInputs = [
|
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
|
|
|
};
|
|
|
|
}
|