Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / xdg-base-dirs / default.nix
blobb2eb4094c92725f6e92858240d6480c925e021c1
1 { lib
2 , buildPythonPackage
3 , pythonOlder
4 , fetchFromGitHub
5 , poetry-core
6 , pytestCheckHook
7 }:
9 buildPythonPackage rec {
10   pname = "xdg-base-dirs";
11   version = "6.0.1";
12   format = "pyproject";
14   disabled = pythonOlder "3.10";
16   src = fetchFromGitHub {
17     owner = "srstevenson";
18     repo = "xdg-base-dirs";
19     rev = version;
20     hash = "sha256-nbdF1tjVqlxwiGW0pySS6HyJbmNuQ7mVdQYfhofO4Dk=";
21   };
23   nativeBuildInputs = [
24     poetry-core
25   ];
27   nativeCheckInputs = [ pytestCheckHook ];
29   pythonImportsCheck = [ "xdg_base_dirs" ];
31   # remove coverage flags from pytest config
32   postPatch = ''
33     sed -i /addopts/d pyproject.toml
34   '';
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   };