nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 argon2-cffi,
4 buildPythonPackage,
5 fetchFromGitHub,
6 setuptools,
7 keyring,
8 pycryptodome,
9 pytestCheckHook,
10 pytest-cov-stub,
11}:
12
13buildPythonPackage rec {
14 pname = "keyrings-cryptfile";
15 version = "1.4.1";
16 pyproject = true;
17
18 src = fetchFromGitHub {
19 owner = "frispete";
20 repo = "keyrings.cryptfile";
21 tag = "v${version}";
22 hash = "sha256-cDXx0s3o8hNqgzX4oNkjGhNcaUX5vi1uN2d9sdbiZwk=";
23 };
24
25 build-system = [ setuptools ];
26
27 dependencies = [
28 argon2-cffi
29 keyring
30 pycryptodome
31 ];
32
33 pythonImportsCheck = [ "keyrings.cryptfile" ];
34
35 nativeCheckInputs = [
36 pytestCheckHook
37 pytest-cov-stub
38 ];
39
40 disabledTests = [
41 # correct raise `ValueError`s which pytest fails to catch for some reason:
42 "test_empty_username"
43 # TestEncryptedFileKeyring::test_file raises 'ValueError: Incorrect Password' for some reason, maybe mock related:
44 "TestEncryptedFileKeyring"
45 ];
46
47 meta = {
48 description = "Encrypted file keyring backend";
49 mainProgram = "cryptfile-convert";
50 homepage = "https://github.com/frispete/keyrings.cryptfile";
51 changelog = "https://github.com/frispete/keyrings.cryptfile/blob/v${version}/CHANGES.md";
52 license = lib.licenses.mit;
53 maintainers = [ lib.maintainers.bbjubjub ];
54 };
55}