depot/third_party/nixpkgs/pkgs/development/python-modules/xdg-base-dirs/default.nix
Default email 5e7c2d6cef Project import generated by Copybara.
GitOrigin-RevId: f99e5f03cc0aa231ab5950a15ed02afec45ed51a
2023-10-09 21:29:22 +02:00

43 lines
985 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 = "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 ];
};
}