at 25.11-pre 1.4 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 click, 5 fetchFromGitHub, 6 maison, 7 pdm-backend, 8 pytest-freezegun, 9 pytest-xdist, 10 pytestCheckHook, 11 pythonOlder, 12 ruyaml, 13 setuptools, 14}: 15let 16 maison143 = maison.overridePythonAttrs (old: rec { 17 version = "1.4.3"; 18 src = fetchFromGitHub { 19 owner = "dbatten5"; 20 repo = "maison"; 21 tag = "v${version}"; 22 hash = "sha256-2hUmk91wr5o2cV3un2nMoXDG+3GT7SaIOKY+QaZY3nw="; 23 }; 24 }); 25in 26 27buildPythonPackage rec { 28 pname = "yamlfix"; 29 version = "1.16.0"; 30 pyproject = true; 31 32 disabled = pythonOlder "3.8"; 33 34 src = fetchFromGitHub { 35 owner = "lyz-code"; 36 repo = "yamlfix"; 37 tag = version; 38 hash = "sha256-nadyBIzXHbWm0QvympRaYU38tuPJ3TPJg8EbvVv+4L0="; 39 }; 40 41 build-system = [ 42 setuptools 43 pdm-backend 44 ]; 45 46 dependencies = [ 47 click 48 maison143 49 ruyaml 50 ]; 51 52 nativeCheckInputs = [ 53 pytest-freezegun 54 pytest-xdist 55 pytestCheckHook 56 ]; 57 58 preCheck = '' 59 export HOME=$(mktemp -d) 60 ''; 61 62 pythonImportsCheck = [ "yamlfix" ]; 63 64 pytestFlagsArray = [ 65 "-W" 66 "ignore::DeprecationWarning" 67 ]; 68 69 meta = with lib; { 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/${version}/CHANGELOG.md"; 73 license = licenses.gpl3Only; 74 maintainers = with maintainers; [ koozz ]; 75 }; 76}