1{ lib
2, buildPythonPackage
3, fetchPypi
4, pythonOlder
5, clikit
6, poetry-core
7}:
8
9buildPythonPackage rec {
10 version = "6.0.0";
11 pname = "xdg";
12 disabled = pythonOlder "3.7";
13 format = "pyproject";
14
15 # the github source uses `xdg_base_dirs`, but pypi's sdist maintains `xdg` for compatibility.
16 # there are actually breaking changes in xdg_base_dirs,
17 # and libraries that want to support python 3.9 and below need to use xdg.
18 src = fetchPypi {
19 inherit pname version;
20 hash = "sha256-JCeAlPLUXoRtHrKKLruS17Z/wMq1JJ7jzojJX2SaHJI=";
21 };
22
23 nativeBuildInputs = [ poetry-core ];
24
25 propagatedBuildInputs = [
26 clikit
27 ];
28
29 # sdist has no tests
30 doCheck = false;
31
32 pythonImportsCheck = [
33 "xdg"
34 ];
35
36 meta = with lib; {
37 description = "XDG Base Directory Specification for Python";
38 homepage = "https://github.com/srstevenson/xdg";
39 license = licenses.isc;
40 maintainers = with maintainers; [ jonringer ];
41 };
42}