diff --git a/pkgs/development/python-modules/yq/default.nix b/pkgs/development/python-modules/yq/default.nix index ae912df37fe..1dde1405bf6 100644 --- a/pkgs/development/python-modules/yq/default.nix +++ b/pkgs/development/python-modules/yq/default.nix @@ -3,16 +3,11 @@ , buildPythonPackage , fetchPypi , substituteAll -, pkgs , argcomplete , pyyaml , xmltodict -# Test inputs -, coverage -, flake8 , jq -, pytest -, toml +, pytestCheckHook }: buildPythonPackage rec { @@ -27,12 +22,13 @@ buildPythonPackage rec { patches = [ (substituteAll { src = ./jq-path.patch; - jq = "${lib.getBin pkgs.jq}/bin/jq"; + jq = "${lib.getBin jq}/bin/jq"; }) ]; 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 = [ @@ -41,16 +37,11 @@ buildPythonPackage rec { argcomplete ]; - doCheck = true; - checkInputs = [ - pytest - coverage - flake8 - toml + pytestCheckHook ]; - checkPhase = "pytest ./test/test.py"; + pytestFlagsArray = [ "test/test.py" ]; pythonImportsCheck = [ "yq" ]; @@ -59,7 +50,7 @@ buildPythonPackage rec { meta = with lib; { description = "Command-line YAML processor - jq wrapper for YAML documents"; homepage = "https://github.com/kislyuk/yq"; - license = [ licenses.asl20 ]; - maintainers = [ maintainers.womfoo ]; + license = licenses.asl20; + maintainers = with maintainers; [ womfoo SuperSandro2000 ]; }; } diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 23dd4638b98..335a1daa0cb 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -8483,7 +8483,9 @@ in { 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 { };