diff options
author | Alyssa Ross <hi@alyssa.is> | 2021-08-04 10:43:07 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2021-08-04 10:43:07 +0000 |
commit | 62614cbef7da005c1eda8c9400160f6bcd6546b8 (patch) | |
tree | c2630f69080637987b68acb1ee8676d2681fe304 /pkgs/tools/admin/amazon-ec2-utils/default.nix | |
parent | d9c82ed3044c72cecf01c6ea042489d30914577c (diff) | |
parent | e24069138dfec3ef94f211f1da005bb5395adc11 (diff) | |
download | nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.gz nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.bz2 nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.lz nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.xz nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.zst nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.zip |
Merge branch 'nixpkgs-update' into master
Diffstat (limited to 'pkgs/tools/admin/amazon-ec2-utils/default.nix')
-rw-r--r-- | pkgs/tools/admin/amazon-ec2-utils/default.nix | 53 |
1 files changed, 53 insertions, 0 deletions
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 00000000000..2dc91f037a9 --- /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 ]; + }; +} |