lol
at 22.05-pre 53 lines 1.1 kB view raw
1{ stdenv 2, lib 3, fetchFromGitHub 4, curl 5, python3 6}: 7stdenv.mkDerivation rec { 8 pname = "amazon-ec2-utils"; 9 version = "1.3"; 10 11 src = fetchFromGitHub { 12 owner = "aws"; 13 repo = "amazon-ec2-utils"; 14 rev = version; 15 hash = "sha256:04dpxaaca144a74r6d93q4lp0d5l32v07rldj7v2v1c6s9nsf4mv"; 16 }; 17 18 buildInputs = [ 19 python3 20 ]; 21 22 propagatedBuildInputs = [ 23 curl 24 ]; 25 26 installPhase = '' 27 mkdir -p $out/bin/ 28 29 cp ebsnvme-id $out/bin/ 30 cp ec2-metadata $out/bin/ 31 cp ec2udev-vbd $out/bin/ 32 cp ec2udev-vcpu $out/bin/ 33 34 chmod +x $out/bin/* 35 ''; 36 37 doInstallCheck = true; 38 39 # We cannot run 40 # ec2-metadata --help 41 # because it actually checks EC2 metadata even if --help is given 42 # so it won't work in the test sandbox. 43 installCheckPhase = '' 44 $out/bin/ebsnvme-id --help 45 ''; 46 47 meta = with lib; { 48 homepage = "https://github.com/aws/amazon-ec2-utils"; 49 description = "Contains a set of utilities and settings for Linux deployments in EC2"; 50 license = licenses.mit; 51 maintainers = with maintainers; [ ketzacoatl ]; 52 }; 53}