git.iko.soy/typeable/nixpkgs
on master help sign in
pythonPackages.keyrings-cryptfile: init at 1.3.4
commitd4fdd9a19cf149ea4009bb344f4100930ad39ff1 authorLouis Bettens <louis@bettens.info> dateSun 9 May 2021, 16:01 (6 years ago) parent19b3863
3 files changed+75
pkgs/development/python-modules/keyrings-cryptfile/default.nix+59 pkgs/development/python-modules/keyrings-cryptfile/fix-testsuite.patch+14 pkgs/top-level/python-packages.nix+2
pkgs/development/python-modules/keyrings-cryptfile/default.nixnew file+59
@@ -0,0 +1,59 @@
1+{ lib
2+, buildPythonPackage
3+, fetchPypi
4+, fetchpatch
5+, argon2_cffi
6+, keyring
7+, pycryptodome
8+, pytestCheckHook
9+, pythonOlder
10+}:
11+
12+buildPythonPackage rec {
13+ pname = "keyrings.cryptfile";
14+ # NOTE: newer releases are bugged/incompatible
15+ # https://github.com/frispete/keyrings.cryptfile/issues/15
16+ version = "1.3.4";
17+ disabled = pythonOlder "3.5";
18+
19+ src = fetchPypi {
20+ inherit pname version;
21+ sha256 = "sha256-jW+cKMm+xef8C+fl0CGe+6SEkYBHDjFX2/kLCZ62j6c=";
22+ };
23+
24+ patches = [
25+ # upstream setup.cfg has an option that is not supported
26+ ./fix-testsuite.patch
27+ # change of API in keyrings.testing
28+ (fetchpatch {
29+ url = "https://github.com/frispete/keyrings.cryptfile/commit/6fb9e45f559b8b69f7a0a519c0bece6324471d79.patch";
30+ sha256 = "sha256-1878pMO9Ed1zs1pl+7gMjwx77HbDHdE1CryN8TPfPdU=";
31+ })
32+ ];
33+
34+ propagatedBuildInputs = [
35+ argon2_cffi
36+ keyring
37+ pycryptodome
38+ ];
39+
40+ pythonImportsCheck = [
41+ "keyrings.cryptfile"
42+ ];
43+
44+ checkInputs = [
45+ pytestCheckHook
46+ ];
47+
48+ disabledTests = [
49+ "test_set_properties"
50+ "UncryptedFileKeyringTestCase"
51+ ];
52+
53+ meta = with lib; {
54+ description = "Encrypted file keyring backend";
55+ homepage = "https://github.com/frispete/keyrings.cryptfile";
56+ license = licenses.mit;
57+ maintainers = teams.chia.members;
58+ };
59+}
pkgs/development/python-modules/keyrings-cryptfile/fix-testsuite.patchnew file+14
@@ -0,0 +1,14 @@
1+diff --git a/setup.cfg b/setup.cfg
2+index ec7eb30..7ffd831 100644
3+--- a/setup.cfg
4++++ b/setup.cfg
5+@@ -5,9 +5,6 @@ dists = clean --all sdist bdist_wheel
6+ [wheel]
7+ universal = 1
8+
9+-[tool:pytest]
10+-addopts = -s --cov=keyrings/cryptfile
11+-
12+ [egg_info]
13+ tag_build =
14+ tag_date = 0
pkgs/top-level/python-packages.nix+2
@@ -3661,6 +3661,8 @@ in {
36613661
36623662 keyring = callPackage ../development/python-modules/keyring { };
36633663
3664+ keyrings-cryptfile = callPackage ../development/python-modules/keyrings-cryptfile { };
3665+
36643666 keyrings-alt = callPackage ../development/python-modules/keyrings-alt { };
36653667
36663668 keystone-engine = callPackage ../development/python-modules/keystone-engine { };