nixpkgs/pkgs/development/python-modules/yq/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

56 lines
963 B
Nix
Raw Normal View History

{ lib
, buildPythonPackage
, fetchPypi
, substituteAll
, argcomplete
, pyyaml
, toml
, xmltodict
, jq
2022-04-06 22:30:55 +01:00
, setuptools-scm
, pytestCheckHook
}:
2017-11-13 18:32:13 +00:00
buildPythonPackage rec {
2017-11-13 18:32:13 +00:00
pname = "yq";
2022-07-25 04:09:30 +01:00
version = "3.1.0";
2017-11-13 18:32:13 +00:00
src = fetchPypi {
inherit pname version;
2022-07-25 04:09:30 +01:00
sha256 = "sha256-MKhKoiSGx0m6JpJWvVhsC803C34qcedsOSTq1IZ+dPI=";
};
patches = [
(substituteAll {
src = ./jq-path.patch;
jq = "${lib.getBin jq}/bin/jq";
})
];
2022-04-06 22:30:55 +01:00
nativeBuildInputs = [
setuptools-scm
];
propagatedBuildInputs = [
pyyaml
xmltodict
toml
argcomplete
];
2017-11-13 18:32:13 +00:00
checkInputs = [
pytestCheckHook
];
pytestFlagsArray = [ "test/test.py" ];
2017-11-13 18:32:13 +00:00
pythonImportsCheck = [ "yq" ];
2017-11-13 18:32:13 +00:00
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 ];
2017-11-13 18:32:13 +00:00
};
}