summary refs log tree commit diff
path: root/pkgs/development/tools/ec2-metadata-mock/default.nix
blob: 838e9941772223e229178a31a698f8ed65368387 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
{ lib, buildGoModule, fetchFromGitHub }:

buildGoModule rec {
  pname = "ec2-metadata-mock";
  version = "1.10.1";

  src = fetchFromGitHub {
    owner = "aws";
    repo = "amazon-ec2-metadata-mock";
    rev = "v${version}";
    sha256 = "sha256-sWs3chJqXL1YTHgSY0kD+PINrF4eOThOdcgSis3Mecs=";
  };

  vendorSha256 = "sha256-HbU6Y5SART+FjFyEpzv243yfo/A4yprPen5Mlhq0hbg=";

  postInstall = ''
    mv $out/bin/{cmd,ec2-metadata-mock}
  '';

  meta = with lib; {
    description = "Amazon EC2 Metadata Mock";
    homepage = "https://github.com/aws/amazon-ec2-metadata-mock";
    license = licenses.asl20;
    maintainers = with maintainers; [ ymatsiuk ];
  };
}