Merge pull request #170222 from fabaff/aws-adfs-fix
python3Packages.aws-adfs: update substituteInPlace
This commit is contained in:
commit
5c1c4de7da
1 changed files with 41 additions and 23 deletions
|
@ -1,31 +1,42 @@
|
||||||
{ lib
|
{ lib
|
||||||
|
, boto3
|
||||||
, botocore
|
, botocore
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
, click
|
, click
|
||||||
, configparser
|
, configparser
|
||||||
, fetchPypi
|
, fetchFromGitHub
|
||||||
|
, fetchpatch
|
||||||
, fido2
|
, fido2
|
||||||
, glibcLocales
|
|
||||||
, isPy27
|
|
||||||
, lxml
|
, lxml
|
||||||
, mock
|
, poetry-core
|
||||||
, pyopenssl
|
, pyopenssl
|
||||||
, pytestCheckHook
|
, pytestCheckHook
|
||||||
|
, pythonOlder
|
||||||
, requests
|
, requests
|
||||||
, requests-kerberos
|
, requests-kerberos
|
||||||
|
, toml
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "aws-adfs";
|
pname = "aws-adfs";
|
||||||
version = "2.0.1";
|
version = "2.0.1";
|
||||||
disabled = isPy27;
|
format = "pyproject";
|
||||||
|
|
||||||
src = fetchPypi {
|
disabled = pythonOlder "3.6";
|
||||||
inherit pname version;
|
|
||||||
sha256 = "sha256-+WMv52JIbh51pqLhDnUCzrcbPD5eutzwFcPOhO+nR7s=";
|
src = fetchFromGitHub {
|
||||||
|
owner = "venth";
|
||||||
|
repo = pname;
|
||||||
|
rev = version;
|
||||||
|
hash = "sha256-0BURXbEOZvb8kszuajLtR+V7HjJycCBAQrm3WqpVB1w=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
poetry-core
|
||||||
|
];
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
|
boto3
|
||||||
botocore
|
botocore
|
||||||
click
|
click
|
||||||
configparser
|
configparser
|
||||||
|
@ -36,31 +47,38 @@ buildPythonPackage rec {
|
||||||
requests-kerberos
|
requests-kerberos
|
||||||
];
|
];
|
||||||
|
|
||||||
checkInputs = [
|
patches = [
|
||||||
glibcLocales
|
# Switch to poetry-core, https://github.com/venth/aws-adfs/pull/230
|
||||||
mock
|
(fetchpatch {
|
||||||
pytestCheckHook
|
name = "switch-to-poetry-core.patch";
|
||||||
|
url = "https://github.com/venth/aws-adfs/commit/da095ccf64629d36a6045ffec2684038378ee690.patch";
|
||||||
|
sha256 = "sha256-xg4c7iIonkUmNN74q/UeGSuYP3to7q4cLW6+TMW9nh4=";
|
||||||
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
# Relax version constraint
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
substituteInPlace setup.py \
|
substituteInPlace pyproject.toml \
|
||||||
--replace 'coverage < 4' 'coverage' \
|
--replace 'boto3 = "^1.20.50"' 'boto3 = "*"' \
|
||||||
--replace 'fido2>=0.8.1,<0.9.0' 'fido2>=0.8.1,<1.0.0'
|
--replace 'botocore = ">=1.12.6"' 'botocore = "*"'
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# Test suite writes files to $HOME/.aws/, or /homeless-shelter if unset
|
checkInputs = [
|
||||||
HOME = ".";
|
pytestCheckHook
|
||||||
|
toml
|
||||||
|
];
|
||||||
|
|
||||||
# Required for python3 tests, along with glibcLocales
|
preCheck = ''
|
||||||
LC_ALL = "en_US.UTF-8";
|
export HOME=$(mktemp -d);
|
||||||
|
'';
|
||||||
|
|
||||||
pythonImportsCheck = [ "aws_adfs" ];
|
pythonImportsCheck = [
|
||||||
|
"aws_adfs"
|
||||||
|
];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Command line tool to ease aws cli authentication against ADFS";
|
description = "Command line tool to ease AWS CLI authentication against ADFS";
|
||||||
homepage = "https://github.com/venth/aws-adfs";
|
homepage = "https://github.com/venth/aws-adfs";
|
||||||
license = licenses.psfl;
|
license = licenses.psfl;
|
||||||
maintainers = [ maintainers.bhipple ];
|
maintainers = with maintainers; [ bhipple ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue