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