diff options
author | Niklas Hambüchen <mail@nh2.me> | 2021-01-08 20:43:12 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-08 20:43:12 +0100 |
commit | 22b9910f4eb58919536371ff8c3cb6c72cbaf057 (patch) | |
tree | f0874f7b0acfe1a687874723752480de33da50bd | |
parent | e49e3a756b325ca47f31c11bddd296d807f2eca0 (diff) | |
parent | 630d0163aeae73ae7d61d5801f8071411b0649aa (diff) |
Merge pull request #108804 from ketzacoatl/amazon-ec2-utils
Amazon ec2 utils
-rw-r--r-- | maintainers/maintainer-list.nix | 6 | ||||
-rw-r--r-- | pkgs/tools/admin/amazon-ec2-utils/default.nix | 53 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 2 |
3 files changed, 61 insertions, 0 deletions
diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 8fcae365bc82..10a0d0588c17 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -4654,6 +4654,12 @@ githubId = 2029444; name = "James Kent"; }; + ketzacoatl = { + email = "ketzacoatl@protonmail.com"; + github = "ketzacoatl"; + githubId = 10122937; + name = "ketzacoatl"; + }; kevincox = { email = "kevincox@kevincox.ca"; github = "kevincox"; diff --git a/pkgs/tools/admin/amazon-ec2-utils/default.nix b/pkgs/tools/admin/amazon-ec2-utils/default.nix new file mode 100644 index 000000000000..2dc91f037a98 --- /dev/null +++ b/pkgs/tools/admin/amazon-ec2-utils/default.nix @@ -0,0 +1,53 @@ +{ stdenv +, lib +, fetchFromGitHub +, curl +, python3 +}: +stdenv.mkDerivation rec { + pname = "amazon-ec2-utils"; + version = "1.3"; + + src = fetchFromGitHub { + owner = "aws"; + repo = "amazon-ec2-utils"; + rev = version; + hash = "sha256:04dpxaaca144a74r6d93q4lp0d5l32v07rldj7v2v1c6s9nsf4mv"; + }; + + buildInputs = [ + python3 + ]; + + propagatedBuildInputs = [ + curl + ]; + + installPhase = '' + mkdir -p $out/bin/ + + cp ebsnvme-id $out/bin/ + cp ec2-metadata $out/bin/ + cp ec2udev-vbd $out/bin/ + cp ec2udev-vcpu $out/bin/ + + chmod +x $out/bin/* + ''; + + doInstallCheck = true; + + # We cannot run + # ec2-metadata --help + # because it actually checks EC2 metadata even if --help is given + # so it won't work in the test sandbox. + installCheckPhase = '' + $out/bin/ebsnvme-id --help + ''; + + meta = with lib; { + homepage = "https://github.com/aws/amazon-ec2-utils"; + description = "Contains a set of utilities and settings for Linux deployments in EC2"; + license = licenses.mit; + maintainers = with maintainers; [ ketzacoatl ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e6ac70dde2b4..cc2e39d492ee 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -831,6 +831,8 @@ in alpine-make-vm-image = callPackage ../tools/virtualization/alpine-make-vm-image { }; + amazon-ec2-utils = callPackage ../tools/admin/amazon-ec2-utils { }; + amazon-ecs-cli = callPackage ../tools/virtualization/amazon-ecs-cli { }; amber = callPackage ../tools/text/amber { |