1{ lib
2, botocore
3, buildPythonPackage
4, click
5, configparser
6, fetchPypi
7, fido2
8, glibcLocales
9, isPy27
10, lxml
11, mock
12, pyopenssl
13, pytestCheckHook
14, requests
15, requests-kerberos
16}:
17
18buildPythonPackage rec {
19 pname = "aws-adfs";
20 version = "1.24.5";
21 disabled = isPy27;
22
23 src = fetchPypi {
24 inherit pname version;
25 sha256 = "6a78bd31477ea9988166215ae86abcbfe1413bee20373ecdf0dd170b7290db55";
26 };
27
28 propagatedBuildInputs = [
29 botocore
30 click
31 configparser
32 fido2
33 lxml
34 pyopenssl
35 requests
36 requests-kerberos
37 ];
38
39 checkInputs = [
40 glibcLocales
41 mock
42 pytestCheckHook
43 ];
44
45 # Relax version constraint
46 postPatch = ''
47 substituteInPlace setup.py \
48 --replace 'coverage < 4' 'coverage' \
49 --replace 'fido2>=0.8.1,<0.9.0' 'fido2>=0.8.1,<1.0.0'
50 '';
51
52 # Test suite writes files to $HOME/.aws/, or /homeless-shelter if unset
53 HOME = ".";
54
55 # Required for python3 tests, along with glibcLocales
56 LC_ALL = "en_US.UTF-8";
57
58 pythonImportsCheck = [ "aws_adfs" ];
59
60 meta = with lib; {
61 description = "Command line tool to ease aws cli authentication against ADFS";
62 homepage = "https://github.com/venth/aws-adfs";
63 license = licenses.psfl;
64 maintainers = [ maintainers.bhipple ];
65 };
66}