From fe7142ef013aefec0375d34c250835d429672a22 Mon Sep 17 00:00:00 2001 From: wxt <3264117476@qq.com> Date: Mon, 11 Nov 2024 20:36:57 +0800 Subject: [PATCH] aws-shell: init at 0.2.2 --- pkgs/by-name/aw/aws-shell/package.nix | 55 +++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 pkgs/by-name/aw/aws-shell/package.nix diff --git a/pkgs/by-name/aw/aws-shell/package.nix b/pkgs/by-name/aw/aws-shell/package.nix new file mode 100644 index 000000000000..5b1222f5ef84 --- /dev/null +++ b/pkgs/by-name/aw/aws-shell/package.nix @@ -0,0 +1,55 @@ +{ + python3Packages, + lib, + fetchFromGitHub, + awscli, +}: + +python3Packages.buildPythonApplication rec { + pname = "aws-shell"; + version = "0.2.2"; + + src = fetchFromGitHub { + owner = "awslabs"; + repo = "aws-shell"; + rev = "refs/tags/${version}"; + hash = "sha256-m96XaaFDFQaD2YPjw8D1sGJ5lex4Is4LQ5RhGzVPvH4="; + }; + + build-system = with python3Packages; [ + setuptools + ]; + + dependencies = with python3Packages; [ + botocore + pygments + mock + configobj + awscli + (prompt-toolkit.overrideAttrs (old: { + src = fetchFromGitHub { + owner = "prompt-toolkit"; + repo = "python-prompt-toolkit"; + rev = "refs/tags/1.0.18"; # Need >=1.0.0,<1.1.0 + hash = "sha256-mt/fIubkpeVc7vhAaTk0pXZXI8JzB7n2MzXqgqK0wE4="; + }; + })) + ]; + + nativeCheckInputs = with python3Packages; [ + pytestCheckHook + ]; + + preCheck = '' + export HOME=$(mktemp -d) + ''; + + meta = { + homepage = "https://github.com/awslabs/aws-shell"; + description = "Integrated shell for working with the AWS CLI"; + platforms = lib.platforms.unix; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ bot-wxt1221 ]; + mainProgram = "aws-shell"; + }; +}