python3Packages.yq: cleanup, use pytestCheckHook, add SuperSandro2000 as maintainer
This commit is contained in:
parent
713951893d
commit
616edb1c64
|
@ -3,16 +3,11 @@
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
, fetchPypi
|
, fetchPypi
|
||||||
, substituteAll
|
, substituteAll
|
||||||
, pkgs
|
|
||||||
, argcomplete
|
, argcomplete
|
||||||
, pyyaml
|
, pyyaml
|
||||||
, xmltodict
|
, xmltodict
|
||||||
# Test inputs
|
|
||||||
, coverage
|
|
||||||
, flake8
|
|
||||||
, jq
|
, jq
|
||||||
, pytest
|
, pytestCheckHook
|
||||||
, toml
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
|
@ -27,12 +22,13 @@ buildPythonPackage rec {
|
||||||
patches = [
|
patches = [
|
||||||
(substituteAll {
|
(substituteAll {
|
||||||
src = ./jq-path.patch;
|
src = ./jq-path.patch;
|
||||||
jq = "${lib.getBin pkgs.jq}/bin/jq";
|
jq = "${lib.getBin jq}/bin/jq";
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
substituteInPlace test/test.py --replace "expect_exit_codes={0} if sys.stdin.isatty() else {2}" "expect_exit_codes={0}"
|
substituteInPlace test/test.py \
|
||||||
|
--replace "expect_exit_codes={0} if sys.stdin.isatty() else {2}" "expect_exit_codes={0}"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
|
@ -41,16 +37,11 @@ buildPythonPackage rec {
|
||||||
argcomplete
|
argcomplete
|
||||||
];
|
];
|
||||||
|
|
||||||
doCheck = true;
|
|
||||||
|
|
||||||
checkInputs = [
|
checkInputs = [
|
||||||
pytest
|
pytestCheckHook
|
||||||
coverage
|
|
||||||
flake8
|
|
||||||
toml
|
|
||||||
];
|
];
|
||||||
|
|
||||||
checkPhase = "pytest ./test/test.py";
|
pytestFlagsArray = [ "test/test.py" ];
|
||||||
|
|
||||||
pythonImportsCheck = [ "yq" ];
|
pythonImportsCheck = [ "yq" ];
|
||||||
|
|
||||||
|
@ -59,7 +50,7 @@ buildPythonPackage rec {
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Command-line YAML processor - jq wrapper for YAML documents";
|
description = "Command-line YAML processor - jq wrapper for YAML documents";
|
||||||
homepage = "https://github.com/kislyuk/yq";
|
homepage = "https://github.com/kislyuk/yq";
|
||||||
license = [ licenses.asl20 ];
|
license = licenses.asl20;
|
||||||
maintainers = [ maintainers.womfoo ];
|
maintainers = with maintainers; [ womfoo SuperSandro2000 ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -8483,7 +8483,9 @@ in {
|
||||||
|
|
||||||
yowsup = callPackage ../development/python-modules/yowsup { };
|
yowsup = callPackage ../development/python-modules/yowsup { };
|
||||||
|
|
||||||
yq = callPackage ../development/python-modules/yq { };
|
yq = callPackage ../development/python-modules/yq {
|
||||||
|
inherit (pkgs) jq;
|
||||||
|
};
|
||||||
|
|
||||||
yt = callPackage ../development/python-modules/yt { };
|
yt = callPackage ../development/python-modules/yt { };
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue