at 24.11-pre 59 lines 1.4 kB view raw
1{ lib 2, python3 3, installShellFiles 4, buildPythonApplication 5, fetchFromGitHub 6, boto3 7, colorama 8, psutil 9, pluggy 10, pyyaml 11}: 12 13buildPythonApplication rec { 14 pname = "awsume"; 15 version = "4.5.3"; 16 17 src = fetchFromGitHub { 18 owner = "trek10inc"; 19 repo = "awsume"; 20 rev = version; 21 sha256 = "sha256-An7omHk2Yxjc6db6Y8QSrtgUvSF5rlVhgxMTpNOePHo="; 22 }; 23 24 AWSUME_SKIP_ALIAS_SETUP = 1; 25 26 nativeBuildInputs = [ installShellFiles ]; 27 28 propagatedBuildInputs = [ 29 colorama 30 boto3 31 psutil 32 pluggy 33 pyyaml 34 ]; 35 36 postPatch = '' 37 patchShebangs shell_scripts 38 substituteInPlace shell_scripts/{awsume,awsume.fish} --replace "awsumepy" "$out/bin/awsumepy" 39 ''; 40 41 postInstall = '' 42 installShellCompletion --cmd awsume \ 43 --bash <(PYTHONPATH=./awsume/configure ${python3}/bin/python3 -c"import autocomplete; print(autocomplete.SCRIPTS['bash'])") \ 44 --zsh <(PYTHONPATH=./awsume/configure ${python3}/bin/python3 -c"import autocomplete; print(autocomplete.SCRIPTS['zsh'])") \ 45 --fish <(PYTHONPATH=./awsume/configure ${python3}/bin/python3 -c"import autocomplete; print(autocomplete.SCRIPTS['fish'])") \ 46 47 rm -f $out/bin/awsume.bat 48 ''; 49 50 51 doCheck = false; 52 53 meta = with lib; { 54 description = "A utility for easily assuming AWS IAM roles from the command line"; 55 homepage = "https://github.com/trek10inc/awsume"; 56 license = [ licenses.mit ]; 57 maintainers = [ maintainers.nilp0inter ]; 58 }; 59}