nixpkgs/pkgs/development/tools/ec2-metadata-mock/default.nix

27 lines
658 B
Nix
Raw Normal View History

{ lib, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "ec2-metadata-mock";
2022-02-12 06:57:26 +01:00
version = "1.10.1";
src = fetchFromGitHub {
owner = "aws";
repo = "amazon-ec2-metadata-mock";
rev = "v${version}";
2022-02-12 06:57:26 +01:00
sha256 = "sha256-sWs3chJqXL1YTHgSY0kD+PINrF4eOThOdcgSis3Mecs=";
};
2022-02-12 06:57:26 +01:00
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 ];
};
}