Merge pull request #167624 from dotlambda/yq-improve

This commit is contained in:
Sandro 2022-04-07 15:36:14 +02:00 committed by GitHub
commit 9699dc610d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,6 +4,7 @@
, substituteAll
, argcomplete
, pyyaml
, toml
, xmltodict
, jq
, setuptools-scm
@ -26,11 +27,6 @@ buildPythonPackage rec {
})
];
postPatch = ''
substituteInPlace test/test.py \
--replace "expect_exit_codes={0} if sys.stdin.isatty() else {2}" "expect_exit_codes={0}"
'';
nativeBuildInputs = [
setuptools-scm
];
@ -38,6 +34,7 @@ buildPythonPackage rec {
propagatedBuildInputs = [
pyyaml
xmltodict
toml
argcomplete
];
@ -49,13 +46,8 @@ buildPythonPackage rec {
pythonImportsCheck = [ "yq" ];
doInstallCheck = true;
installCheckPhase = ''
echo '{"hello":{"foo":"bar"}}' | $out/bin/yq -y . | grep 'foo: bar'
'';
meta = with lib; {
description = "Command-line YAML processor - jq wrapper for YAML documents";
description = "Command-line YAML/XML/TOML processor - jq wrapper for YAML, XML, TOML documents";
homepage = "https://github.com/kislyuk/yq";
license = licenses.asl20;
maintainers = with maintainers; [ womfoo SuperSandro2000 ];