depot/third_party/nixpkgs/pkgs/development/python-modules/yq/default.nix
Default email fa5436e0a7 Project import generated by Copybara.
GitOrigin-RevId: e8057b67ebf307f01bdcc8fba94d94f75039d1f6
2024-06-05 17:53:02 +02:00

57 lines
1 KiB
Nix

{
lib,
argcomplete,
buildPythonPackage,
fetchPypi,
jq,
pytestCheckHook,
pyyaml,
setuptools-scm,
substituteAll,
tomlkit,
xmltodict,
}:
buildPythonPackage rec {
pname = "yq";
version = "3.4.3";
format = "setuptools";
src = fetchPypi {
inherit pname version;
hash = "sha256-ulhqGm8wz3BbL5IgZxLfIoHNMgKAIQ57e4Cty48lbjs=";
};
patches = [
(substituteAll {
src = ./jq-path.patch;
jq = "${lib.getBin jq}/bin/jq";
})
];
nativeBuildInputs = [ setuptools-scm ];
propagatedBuildInputs = [
argcomplete
pyyaml
tomlkit
xmltodict
];
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
];
mainProgram = "yq";
};
}