depot/third_party/nixpkgs/pkgs/development/python-modules/keyring/default.nix
Default email d5f4a57cbf Project import generated by Copybara.
GitOrigin-RevId: ce5e4a6ef2e59d89a971bc434ca8ca222b9c7f5e
2023-08-10 09:59:29 +02:00

62 lines
1.3 KiB
Nix

{ lib
, stdenv
, buildPythonPackage
, fetchPypi
, pythonOlder
, setuptools-scm
, importlib-metadata
, dbus-python
, jaraco-classes
, jeepney
, secretstorage
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "keyring";
version = "24.2.0";
format = "pyproject";
disabled = pythonOlder "3.8";
src = fetchPypi {
inherit pname version;
hash = "sha256-ygdGoZ7EISGfTXE/hI+il6ZhqKjBUEhn5Vv7XgkJFQk=";
};
nativeBuildInputs = [
setuptools-scm
];
propagatedBuildInputs = [
jaraco-classes
] ++ lib.optionals stdenv.isLinux [
jeepney
secretstorage
] ++ lib.optionals (pythonOlder "3.12") [
importlib-metadata
];
pythonImportsCheck = [
"keyring"
"keyring.backend"
];
nativeCheckInputs = [
pytestCheckHook
];
disabledTestPaths = [
"tests/backends/test_macOS.py"
]
# These tests fail when sandboxing is enabled because they are unable to get a password from keychain.
++ lib.optional stdenv.isDarwin "tests/test_multiprocess.py";
meta = with lib; {
description = "Store and access your passwords safely";
homepage = "https://github.com/jaraco/keyring";
changelog = "https://github.com/jaraco/keyring/blob/v${version}/NEWS.rst";
license = licenses.mit;
maintainers = with maintainers; [ lovek323 dotlambda ];
platforms = platforms.unix;
};
}