2023-05-24 13:37:59 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, pythonOlder
|
|
|
|
, fetchFromGitHub
|
|
|
|
, poetry-core
|
|
|
|
, pytestCheckHook
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "xdg-base-dirs";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "6.0.1";
|
2023-05-24 13:37:59 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.10";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "srstevenson";
|
|
|
|
repo = "xdg-base-dirs";
|
|
|
|
rev = version;
|
2023-10-09 19:29:22 +00:00
|
|
|
hash = "sha256-nbdF1tjVqlxwiGW0pySS6HyJbmNuQ7mVdQYfhofO4Dk=";
|
2023-05-24 13:37:59 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "xdg_base_dirs" ];
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
# remove coverage flags from pytest config
|
|
|
|
postPatch = ''
|
|
|
|
sed -i /addopts/d pyproject.toml
|
|
|
|
'';
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "An implementation of the XDG Base Directory Specification in Python";
|
|
|
|
homepage = "https://github.com/srstevenson/xdg-base-dirs";
|
|
|
|
changelog = "https://github.com/srstevenson/xdg-base-dirs/releases/tag/${src.rev}";
|
|
|
|
license = licenses.isc;
|
|
|
|
maintainers = with maintainers; [ figsoda ];
|
|
|
|
};
|
|
|
|
}
|