depot/third_party/nixpkgs/pkgs/development/python-modules/xdg-base-dirs/default.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

42 lines
984 B
Nix

{
lib,
buildPythonPackage,
pythonOlder,
fetchFromGitHub,
poetry-core,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "xdg-base-dirs";
version = "6.0.1";
format = "pyproject";
disabled = pythonOlder "3.10";
src = fetchFromGitHub {
owner = "srstevenson";
repo = "xdg-base-dirs";
rev = version;
hash = "sha256-nbdF1tjVqlxwiGW0pySS6HyJbmNuQ7mVdQYfhofO4Dk=";
};
nativeBuildInputs = [ poetry-core ];
nativeCheckInputs = [ pytestCheckHook ];
pythonImportsCheck = [ "xdg_base_dirs" ];
# remove coverage flags from pytest config
postPatch = ''
sed -i /addopts/d pyproject.toml
'';
meta = with lib; {
description = "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 ];
};
}