awsume: migrate to by-name (#428607)

authored by Weijia Wang and committed by GitHub d04e5780 f815f873

+57 -66
+57
pkgs/by-name/aw/awsume/package.nix
··· 1 + { 2 + lib, 3 + installShellFiles, 4 + fetchFromGitHub, 5 + python3Packages, 6 + }: 7 + 8 + python3Packages.buildPythonApplication rec { 9 + pname = "awsume"; 10 + version = "4.5.5"; 11 + format = "setuptools"; 12 + 13 + src = fetchFromGitHub { 14 + owner = "trek10inc"; 15 + repo = "awsume"; 16 + tag = version; 17 + hash = "sha256-lm9YANYckyHDoNbB1wytBm55iyBmUuxFPmZupfpReqc="; 18 + }; 19 + 20 + AWSUME_SKIP_ALIAS_SETUP = 1; 21 + 22 + nativeBuildInputs = [ installShellFiles ]; 23 + 24 + dependencies = with python3Packages; [ 25 + colorama 26 + boto3 27 + psutil 28 + pluggy 29 + pyyaml 30 + setuptools 31 + ]; 32 + 33 + postPatch = '' 34 + patchShebangs shell_scripts 35 + substituteInPlace shell_scripts/{awsume,awsume.fish} --replace-fail "awsumepy" "$out/bin/awsumepy" 36 + substituteInPlace awsume/configure/autocomplete.py --replace-fail "awsume-autocomplete" "$out/bin/awsume-autocomplete" 37 + ''; 38 + 39 + postInstall = '' 40 + installShellCompletion --cmd awsume \ 41 + --bash <(PYTHONPATH=./awsume/configure python3 -c"import autocomplete; print(autocomplete.SCRIPTS['bash'])") \ 42 + --zsh <(PYTHONPATH=./awsume/configure python3 -c"import autocomplete; print(autocomplete.ZSH_AUTOCOMPLETE_FUNCTION)") \ 43 + --fish <(PYTHONPATH=./awsume/configure python3 -c"import autocomplete; print(autocomplete.SCRIPTS['fish'])") \ 44 + 45 + rm -f $out/bin/awsume.bat 46 + ''; 47 + 48 + doCheck = false; 49 + 50 + meta = { 51 + description = "Utility for easily assuming AWS IAM roles from the command line"; 52 + homepage = "https://github.com/trek10inc/awsume"; 53 + license = lib.licenses.mit; 54 + mainProgram = "awsume"; 55 + maintainers = with lib.maintainers; [ nilp0inter ]; 56 + }; 57 + }
-64
pkgs/tools/admin/awsume/default.nix
··· 1 - { 2 - lib, 3 - python, 4 - installShellFiles, 5 - buildPythonApplication, 6 - fetchFromGitHub, 7 - boto3, 8 - colorama, 9 - psutil, 10 - pluggy, 11 - pyyaml, 12 - setuptools, 13 - }: 14 - 15 - buildPythonApplication rec { 16 - pname = "awsume"; 17 - version = "4.5.5"; 18 - format = "setuptools"; 19 - 20 - src = fetchFromGitHub { 21 - owner = "trek10inc"; 22 - repo = "awsume"; 23 - rev = version; 24 - sha256 = "sha256-lm9YANYckyHDoNbB1wytBm55iyBmUuxFPmZupfpReqc="; 25 - }; 26 - 27 - AWSUME_SKIP_ALIAS_SETUP = 1; 28 - 29 - nativeBuildInputs = [ installShellFiles ]; 30 - 31 - propagatedBuildInputs = [ 32 - colorama 33 - boto3 34 - psutil 35 - pluggy 36 - pyyaml 37 - setuptools 38 - ]; 39 - 40 - postPatch = '' 41 - patchShebangs shell_scripts 42 - substituteInPlace shell_scripts/{awsume,awsume.fish} --replace-fail "awsumepy" "$out/bin/awsumepy" 43 - substituteInPlace awsume/configure/autocomplete.py --replace-fail "awsume-autocomplete" "$out/bin/awsume-autocomplete" 44 - ''; 45 - 46 - postInstall = '' 47 - installShellCompletion --cmd awsume \ 48 - --bash <(PYTHONPATH=./awsume/configure ${python}/bin/python3 -c"import autocomplete; print(autocomplete.SCRIPTS['bash'])") \ 49 - --zsh <(PYTHONPATH=./awsume/configure ${python}/bin/python3 -c"import autocomplete; print(autocomplete.ZSH_AUTOCOMPLETE_FUNCTION)") \ 50 - --fish <(PYTHONPATH=./awsume/configure ${python}/bin/python3 -c"import autocomplete; print(autocomplete.SCRIPTS['fish'])") \ 51 - 52 - rm -f $out/bin/awsume.bat 53 - ''; 54 - 55 - doCheck = false; 56 - 57 - meta = with lib; { 58 - description = "Utility for easily assuming AWS IAM roles from the command line"; 59 - homepage = "https://github.com/trek10inc/awsume"; 60 - license = [ licenses.mit ]; 61 - mainProgram = "awsume"; 62 - maintainers = [ maintainers.nilp0inter ]; 63 - }; 64 - }
-2
pkgs/top-level/all-packages.nix
··· 1610 1610 1611 1611 autoflake = with python3.pkgs; toPythonApplication autoflake; 1612 1612 1613 - awsume = python3Packages.callPackage ../tools/admin/awsume { }; 1614 - 1615 1613 aws-mfa = python3Packages.callPackage ../tools/admin/aws-mfa { }; 1616 1614 1617 1615 azure-cli-extensions = recurseIntoAttrs azure-cli.extensions;