nixpkgs/pkgs/development/python-modules/yq/default.nix
adisbladis 02dab4ab5c python3.pkgs.*: Explicitly pass buildPythonPackage format parameter
Long term we should move everything over to `pyproject = true`, but in
the mean time we can work towards deprecating the implicit `format` paremeter.

cc https://github.com/NixOS/nixpkgs/issues/253154
cc @mweinelt @figsoda
2023-12-07 17:46:49 +01:00

57 lines
1,023 B
Nix

{ lib
, argcomplete
, buildPythonPackage
, fetchPypi
, jq
, pytestCheckHook
, pyyaml
, setuptools-scm
, substituteAll
, tomlkit
, xmltodict
}:
buildPythonPackage rec {
pname = "yq";
version = "3.2.3";
format = "setuptools";
src = fetchPypi {
inherit pname version;
hash = "sha256-Kcj+HTa09kFj9NATFMauIXU5hw9hAhbe5gJd+16vr7E=";
};
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";
};
}