depot/third_party/nixpkgs/pkgs/development/python-modules/keyrings-cryptfile/default.nix
Default email 472aeafc57 Project import generated by Copybara.
GitOrigin-RevId: c31898adf5a8ed202ce5bea9f347b1c6871f32d1
2024-10-04 18:56:33 +02:00

58 lines
1.3 KiB
Nix

{
lib,
argon2-cffi,
buildPythonPackage,
fetchFromGitHub,
setuptools,
keyring,
pycryptodome,
pytestCheckHook,
pytest-cov-stub,
pythonOlder,
}:
buildPythonPackage rec {
pname = "keyrings-cryptfile";
version = "1.4.1";
pyproject = true;
disabled = pythonOlder "3.5";
src = fetchFromGitHub {
owner = "frispete";
repo = "keyrings.cryptfile";
rev = "refs/tags/v${version}";
hash = "sha256-cDXx0s3o8hNqgzX4oNkjGhNcaUX5vi1uN2d9sdbiZwk=";
};
build-system = [ setuptools ];
dependencies = [
argon2-cffi
keyring
pycryptodome
];
pythonImportsCheck = [ "keyrings.cryptfile" ];
nativeCheckInputs = [
pytestCheckHook
pytest-cov-stub
];
disabledTests = [
# correct raise `ValueError`s which pytest fails to catch for some reason:
"test_empty_username"
# TestEncryptedFileKeyring::test_file raises 'ValueError: Incorrect Password' for some reason, maybe mock related:
"TestEncryptedFileKeyring"
];
meta = with lib; {
description = "Encrypted file keyring backend";
mainProgram = "cryptfile-convert";
homepage = "https://github.com/frispete/keyrings.cryptfile";
changelog = "https://github.com/frispete/keyrings.cryptfile/blob/v${version}/CHANGES.md";
license = licenses.mit;
maintainers = [ maintainers.bbjubjub ];
};
}