mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-09 19:13:26 +03:00
ec2-instance-selector: init at 3.1.1
Signed-off-by: Willi Carlsen <carlsenwilli@gmail.com>
This commit is contained in:
parent
c7ea289e5f
commit
53d9e997d4
1 changed files with 46 additions and 0 deletions
46
pkgs/by-name/ec/ec2-instance-selector/package.nix
Normal file
46
pkgs/by-name/ec/ec2-instance-selector/package.nix
Normal file
|
@ -0,0 +1,46 @@
|
|||
{
|
||||
lib,
|
||||
buildGoModule,
|
||||
fetchFromGitHub,
|
||||
versionCheckHook,
|
||||
nix-update-script,
|
||||
}:
|
||||
|
||||
buildGoModule (finalAttrs: {
|
||||
pname = "ec2-instance-selector";
|
||||
version = "3.1.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "aws";
|
||||
repo = "amazon-ec2-instance-selector";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-4J66/LiFFeUW20du2clqjz9ozLV+Sn2VVqF9VISXpb0=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-ocysHrbkmFQ96dEVJvc5YuuBiaXToAcMUUPFiLpMCpU=";
|
||||
|
||||
ldflags = [
|
||||
"-s"
|
||||
"-w"
|
||||
"-X=main.versionID=${finalAttrs.version}"
|
||||
"-X=github.com/aws/amazon-ec2-instance-selector/v3/pkg/selector.versionID=${finalAttrs.version}"
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
rm $out/bin/readme-test
|
||||
mv $out/bin/cmd $out/bin/ec2-instance-selector
|
||||
'';
|
||||
|
||||
doInstallCheck = true;
|
||||
|
||||
passthru.updateScript = nix-update-script { };
|
||||
|
||||
meta = {
|
||||
description = "Recommends instance types based on resource criteria like vcpus and memory";
|
||||
homepage = "https://github.com/aws/amazon-ec2-instance-selector";
|
||||
changelog = "https://github.com/aws/amazon-ec2-instance-selector/tags/v${finalAttrs.version}";
|
||||
license = lib.licenses.asl20;
|
||||
maintainers = with lib.maintainers; [ wcarlsen ];
|
||||
mainProgram = "ec2-instance-selector";
|
||||
};
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue