nixpkgs/pkgs/development/python-modules/yq/default.nix

55 lines
892 B
Nix
Raw Normal View History

{ lib
, buildPythonPackage
, fetchPypi
, pkgs
, argcomplete
, pyyaml
, xmltodict
# Test inputs
, coverage
, flake8
, jq
, pytest
, unixtools
, toml
}:
2017-11-13 18:32:13 +00:00
buildPythonPackage rec {
2017-11-13 18:32:13 +00:00
pname = "yq";
2020-10-01 14:21:21 +01:00
version = "2.11.1";
2017-11-13 18:32:13 +00:00
src = fetchPypi {
inherit pname version;
2020-10-01 14:21:21 +01:00
sha256 = "1q4rky0a6n4izmq7slb91a54g8swry1xrbfqxwc8lkd3hhvlxxkl";
};
propagatedBuildInputs = [
pyyaml
xmltodict
argcomplete
];
2017-11-13 18:32:13 +00:00
doCheck = true;
checkInputs = [
unixtools.script
pytest
coverage
flake8
pkgs.jq
toml
];
# tests fails if stdin is not a tty
checkPhase = "echo | script -c 'pytest ./test/test.py'";
2017-11-13 18:32:13 +00:00
pythonImportsCheck = [ "yq" ];
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 ];
};
}