2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
|
|
|
pythonOlder,
|
|
|
|
installShellFiles,
|
|
|
|
setuptools-scm,
|
|
|
|
shtab,
|
|
|
|
importlib-metadata,
|
|
|
|
jaraco-classes,
|
2024-07-27 06:49:29 +00:00
|
|
|
jaraco-context,
|
|
|
|
jaraco-functools,
|
2024-06-05 15:53:02 +00:00
|
|
|
jeepney,
|
|
|
|
secretstorage,
|
|
|
|
pytestCheckHook,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "keyring";
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "25.2.1";
|
2024-01-02 11:29:13 +00:00
|
|
|
pyproject = true;
|
2023-08-10 07:59:29 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2022-06-16 17:23:12 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-07-27 06:49:29 +00:00
|
|
|
hash = "sha256-2q/9QtvaJd2vsa1f7EAk5bvP5CRZfKHKRSspmGHknxs=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-06-15 15:56:04 +00:00
|
|
|
nativeBuildInputs = [
|
2024-01-02 11:29:13 +00:00
|
|
|
installShellFiles
|
2021-04-26 19:14:03 +00:00
|
|
|
setuptools-scm
|
2024-01-02 11:29:13 +00:00
|
|
|
shtab
|
2021-04-26 19:14:03 +00:00
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs =
|
2024-07-27 06:49:29 +00:00
|
|
|
[
|
|
|
|
jaraco-classes
|
|
|
|
jaraco-context
|
|
|
|
jaraco-functools
|
|
|
|
]
|
2024-06-05 15:53:02 +00:00
|
|
|
++ lib.optionals stdenv.isLinux [
|
|
|
|
jeepney
|
|
|
|
secretstorage
|
|
|
|
]
|
|
|
|
++ lib.optionals (pythonOlder "3.12") [ importlib-metadata ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
postInstall = ''
|
|
|
|
installShellCompletion --cmd keyring \
|
|
|
|
--bash <($out/bin/keyring --print-completion bash) \
|
|
|
|
--zsh <($out/bin/keyring --print-completion zsh)
|
|
|
|
'';
|
|
|
|
|
2021-04-26 19:14:03 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"keyring"
|
|
|
|
"keyring.backend"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
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";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Store and access your passwords safely";
|
2024-06-05 15:53:02 +00:00
|
|
|
homepage = "https://github.com/jaraco/keyring";
|
|
|
|
changelog = "https://github.com/jaraco/keyring/blob/v${version}/NEWS.rst";
|
|
|
|
license = licenses.mit;
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "keyring";
|
2024-06-05 15:53:02 +00:00
|
|
|
maintainers = with maintainers; [
|
|
|
|
lovek323
|
|
|
|
dotlambda
|
|
|
|
];
|
|
|
|
platforms = platforms.unix;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|