1{ lib, stdenv, buildPythonPackage, fetchPypi, isPy27, pythonOlder
2, dbus-python
3, entrypoints
4, importlib-metadata
5, pytest
6, pytest-flake8
7, secretstorage
8, setuptools_scm
9}:
10
11buildPythonPackage rec {
12 pname = "keyring";
13 version = "20.0.1";
14 disabled = isPy27;
15
16 src = fetchPypi {
17 inherit pname version;
18 sha256 = "963bfa7f090269d30bdc5e25589e5fd9dad2cf2a7c6f176a7f2386910e5d0d8d";
19 };
20
21 nativeBuildInputs = [ setuptools_scm ];
22
23 checkInputs = [ pytest pytest-flake8 ];
24
25 propagatedBuildInputs = [ dbus-python entrypoints ]
26 ++ lib.optional stdenv.isLinux secretstorage
27 ++ lib.optionals (pythonOlder "3.8") [ importlib-metadata ];
28
29 # checks try to access a darwin path on linux
30 doCheck = false;
31
32 meta = with lib; {
33 description = "Store and access your passwords safely";
34 homepage = "https://pypi.python.org/pypi/keyring";
35 license = licenses.psfl;
36 maintainers = with maintainers; [ lovek323 ];
37 platforms = platforms.unix;
38 };
39}