nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 77 lines 1.5 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 6 # build-system 7 pdm-backend, 8 setuptools, 9 10 # dependencies 11 click, 12 maison, 13 pydantic, 14 ruyaml, 15 16 # tests 17 pytest-freezegun, 18 pytest-xdist, 19 pytestCheckHook, 20 versionCheckHook, 21 writableTmpDirAsHomeHook, 22}: 23 24buildPythonPackage rec { 25 pname = "yamlfix"; 26 version = "1.19.1"; 27 pyproject = true; 28 29 src = fetchFromGitHub { 30 owner = "lyz-code"; 31 repo = "yamlfix"; 32 tag = version; 33 hash = "sha256-+bD/kKOI19zptPhO6vB2Q0bQWjkBr+vgqBgAyaoSLJc="; 34 }; 35 36 build-system = [ 37 pdm-backend 38 setuptools 39 ]; 40 41 dependencies = [ 42 click 43 maison 44 pydantic 45 ruyaml 46 ]; 47 48 nativeCheckInputs = [ 49 pytest-freezegun 50 pytest-xdist 51 pytestCheckHook 52 writableTmpDirAsHomeHook 53 versionCheckHook 54 ]; 55 56 pythonImportsCheck = [ "yamlfix" ]; 57 58 pytestFlags = [ 59 "-Wignore::DeprecationWarning" 60 "-Wignore::ResourceWarning" 61 ]; 62 63 disabledTestPaths = [ 64 # Broken since click was updated to 8.2.1 in https://github.com/NixOS/nixpkgs/pull/448189 65 # TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 66 "tests/e2e/test_cli.py" 67 ]; 68 69 meta = { 70 description = "Python YAML formatter that keeps your comments"; 71 homepage = "https://github.com/lyz-code/yamlfix"; 72 changelog = "https://github.com/lyz-code/yamlfix/blob/${src.tag}/CHANGELOG.md"; 73 license = lib.licenses.gpl3Only; 74 maintainers = with lib.maintainers; [ koozz ]; 75 mainProgram = "yamlfix"; 76 }; 77}