at 23.05-pre 963 B view raw
1{ lib 2, buildPythonPackage 3, fetchPypi 4, substituteAll 5, argcomplete 6, pyyaml 7, toml 8, xmltodict 9, jq 10, setuptools-scm 11, pytestCheckHook 12}: 13 14buildPythonPackage rec { 15 pname = "yq"; 16 version = "3.1.0"; 17 18 src = fetchPypi { 19 inherit pname version; 20 sha256 = "sha256-MKhKoiSGx0m6JpJWvVhsC803C34qcedsOSTq1IZ+dPI="; 21 }; 22 23 patches = [ 24 (substituteAll { 25 src = ./jq-path.patch; 26 jq = "${lib.getBin jq}/bin/jq"; 27 }) 28 ]; 29 30 nativeBuildInputs = [ 31 setuptools-scm 32 ]; 33 34 propagatedBuildInputs = [ 35 pyyaml 36 xmltodict 37 toml 38 argcomplete 39 ]; 40 41 checkInputs = [ 42 pytestCheckHook 43 ]; 44 45 pytestFlagsArray = [ "test/test.py" ]; 46 47 pythonImportsCheck = [ "yq" ]; 48 49 meta = with lib; { 50 description = "Command-line YAML/XML/TOML processor - jq wrapper for YAML, XML, TOML documents"; 51 homepage = "https://github.com/kislyuk/yq"; 52 license = licenses.asl20; 53 maintainers = with maintainers; [ womfoo SuperSandro2000 ]; 54 }; 55}