1{ lib 2, buildPythonPackage 3, pythonOlder 4, fetchFromGitHub 5, poetry-core 6, pytestCheckHook 7}: 8 9buildPythonPackage rec { 10 pname = "xdg-base-dirs"; 11 version = "6.0.1"; 12 format = "pyproject"; 13 14 disabled = pythonOlder "3.10"; 15 16 src = fetchFromGitHub { 17 owner = "srstevenson"; 18 repo = "xdg-base-dirs"; 19 rev = version; 20 hash = "sha256-nbdF1tjVqlxwiGW0pySS6HyJbmNuQ7mVdQYfhofO4Dk="; 21 }; 22 23 nativeBuildInputs = [ 24 poetry-core 25 ]; 26 27 nativeCheckInputs = [ pytestCheckHook ]; 28 29 pythonImportsCheck = [ "xdg_base_dirs" ]; 30 31 # remove coverage flags from pytest config 32 postPatch = '' 33 sed -i /addopts/d pyproject.toml 34 ''; 35 36 meta = with lib; { 37 description = "An implementation of the XDG Base Directory Specification in Python"; 38 homepage = "https://github.com/srstevenson/xdg-base-dirs"; 39 changelog = "https://github.com/srstevenson/xdg-base-dirs/releases/tag/${src.rev}"; 40 license = licenses.isc; 41 maintainers = with maintainers; [ figsoda ]; 42 }; 43}