1{
2 lib,
3 boto3,
4 botocore,
5 buildPythonPackage,
6 click,
7 configparser,
8 fetchFromGitHub,
9 fido2,
10 lxml,
11 poetry-core,
12 pyopenssl,
13 pytestCheckHook,
14 pythonOlder,
15 pythonRelaxDepsHook,
16 requests,
17 requests-kerberos,
18 toml,
19}:
20
21buildPythonPackage rec {
22 pname = "aws-adfs";
23 version = "2.11.2";
24 pyproject = true;
25
26 disabled = pythonOlder "3.7";
27
28 src = fetchFromGitHub {
29 owner = "venth";
30 repo = pname;
31 rev = "refs/tags/v${version}";
32 hash = "sha256-ZzQ92VBa8CApd0WkfPrUZsEZICK2fhwmt45P2sx2mK0=";
33 };
34
35 nativeBuildInputs = [
36 poetry-core
37 pythonRelaxDepsHook
38 ];
39
40 pythonRelaxDeps = [ "configparser" ];
41
42 propagatedBuildInputs = [
43 boto3
44 botocore
45 click
46 configparser
47 fido2
48 lxml
49 pyopenssl
50 requests
51 requests-kerberos
52 ];
53
54 nativeCheckInputs = [
55 pytestCheckHook
56 toml
57 ];
58
59 preCheck = ''
60 export HOME=$(mktemp -d);
61 '';
62
63 pythonImportsCheck = [ "aws_adfs" ];
64
65 meta = with lib; {
66 description = "Command line tool to ease AWS CLI authentication against ADFS";
67 mainProgram = "aws-adfs";
68 homepage = "https://github.com/venth/aws-adfs";
69 changelog = "https://github.com/venth/aws-adfs/releases/tag/v${version}";
70 license = licenses.psfl;
71 maintainers = with maintainers; [ bhipple ];
72 };
73}