nixpkgs-suyu/pkgs/development/python-modules/yq/default.nix
Guillaume Girol 33afbf39f6 treewide: switch to nativeCheckInputs
checkInputs used to be added to nativeBuildInputs. Now we have
nativeCheckInputs to do that instead. Doing this treewide change allows
to keep hashes identical to before the introduction of
nativeCheckInputs.
2023-01-21 12:00:00 +00:00

55 lines
969 B
Nix

{ lib
, buildPythonPackage
, fetchPypi
, substituteAll
, argcomplete
, pyyaml
, toml
, xmltodict
, jq
, setuptools-scm
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "yq";
version = "3.1.0";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-MKhKoiSGx0m6JpJWvVhsC803C34qcedsOSTq1IZ+dPI=";
};
patches = [
(substituteAll {
src = ./jq-path.patch;
jq = "${lib.getBin jq}/bin/jq";
})
];
nativeBuildInputs = [
setuptools-scm
];
propagatedBuildInputs = [
pyyaml
xmltodict
toml
argcomplete
];
nativeCheckInputs = [
pytestCheckHook
];
pytestFlagsArray = [ "test/test.py" ];
pythonImportsCheck = [ "yq" ];
meta = with lib; {
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 ];
};
}