nixpkgs/pkgs/development/tools/yq/default.nix

45 lines
755 B
Nix
Raw Normal View History

{ lib
, buildPythonApplication
, fetchPypi
, argcomplete
, pyyaml
, xmltodict
# Test inputs
, coverage
, flake8
, jq
, pytest
, toml
}:
2017-11-13 18:32:13 +00:00
buildPythonApplication rec {
pname = "yq";
version = "2.10.1";
2017-11-13 18:32:13 +00:00
propagatedBuildInputs = [ pyyaml xmltodict jq argcomplete ];
2017-11-13 18:32:13 +00:00
doCheck = true;
checkInputs = [
pytest
coverage
flake8
jq
toml
];
checkPhase = "pytest ./test/test.py";
2017-11-13 18:32:13 +00:00
src = fetchPypi {
inherit pname version;
sha256 = "1h6nnkp53mm4spwy8nyxwvh9j6p4lxvf20j4bgjskhnhaw3jl9gn";
2017-11-13 18:32:13 +00:00
};
meta = with lib; {
description = "Command-line YAML processor - jq wrapper for YAML documents.";
homepage = "https://github.com/kislyuk/yq";
2017-11-13 18:32:13 +00:00
license = [ licenses.asl20 ];
maintainers = [ maintainers.womfoo ];
};
}