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