summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/keyrings-cryptfile/default.nix
diff options
context:
space:
mode:
authorRobin Gloster <mail@glob.in>2021-05-24 09:55:24 -0500
committerRobin Gloster <mail@glob.in>2021-05-24 09:55:24 -0500
commit4bc5fbef9d159e143fb7e2c3231932e6e76f667c (patch)
treee2198f5c552e0667d838b8ec764ddb3a4d8f6dec /pkgs/development/python-modules/keyrings-cryptfile/default.nix
parentjq: fix build with structured-attrs on darwin (diff)
parentMerge pull request #123802 from superherointj/package-virtmanager-bugfix (diff)
downloadnixpkgs-origin/structured-attrs.tar.gz
Merge remote-tracking branch 'upstream/master' into structured-attrsorigin/structured-attrs
Diffstat (limited to 'pkgs/development/python-modules/keyrings-cryptfile/default.nix')
-rw-r--r--pkgs/development/python-modules/keyrings-cryptfile/default.nix59
1 files changed, 59 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/keyrings-cryptfile/default.nix b/pkgs/development/python-modules/keyrings-cryptfile/default.nix
new file mode 100644
index 000000000000..7f2cacea6294
--- /dev/null
+++ b/pkgs/development/python-modules/keyrings-cryptfile/default.nix
@@ -0,0 +1,59 @@
+{ lib
+, buildPythonPackage
+, fetchPypi
+, fetchpatch
+, argon2_cffi
+, keyring
+, pycryptodome
+, pytestCheckHook
+, pythonOlder
+}:
+
+buildPythonPackage rec {
+ pname = "keyrings.cryptfile";
+ # NOTE: newer releases are bugged/incompatible
+ # https://github.com/frispete/keyrings.cryptfile/issues/15
+ version = "1.3.4";
+ disabled = pythonOlder "3.5";
+
+ src = fetchPypi {
+ inherit pname version;
+ sha256 = "sha256-jW+cKMm+xef8C+fl0CGe+6SEkYBHDjFX2/kLCZ62j6c=";
+ };
+
+ patches = [
+ # upstream setup.cfg has an option that is not supported
+ ./fix-testsuite.patch
+ # change of API in keyrings.testing
+ (fetchpatch {
+ url = "https://github.com/frispete/keyrings.cryptfile/commit/6fb9e45f559b8b69f7a0a519c0bece6324471d79.patch";
+ sha256 = "sha256-1878pMO9Ed1zs1pl+7gMjwx77HbDHdE1CryN8TPfPdU=";
+ })
+ ];
+
+ propagatedBuildInputs = [
+ argon2_cffi
+ keyring
+ pycryptodome
+ ];
+
+ pythonImportsCheck = [
+ "keyrings.cryptfile"
+ ];
+
+ checkInputs = [
+ pytestCheckHook
+ ];
+
+ disabledTests = [
+ "test_set_properties"
+ "UncryptedFileKeyringTestCase"
+ ];
+
+ meta = with lib; {
+ description = "Encrypted file keyring backend";
+ homepage = "https://github.com/frispete/keyrings.cryptfile";
+ license = licenses.mit;
+ maintainers = teams.chia.members;
+ };
+}