Skip to content

Commit

Permalink
fleeting-plugin-aws: init at 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
commiterate committed Nov 23, 2024
1 parent 5bc0af1 commit 22708d2
Showing 1 changed file with 58 additions and 0 deletions.
58 changes: 58 additions & 0 deletions pkgs/by-name/fl/fleeting-plugin-aws/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
lib,
buildGoModule,
fetchFromGitLab,
nix-update-script,
versionCheckHook,
}:

buildGoModule rec {
pname = "fleeting-plugin-aws";
version = "1.0.0";

src = fetchFromGitLab {
owner = "gitlab-org/fleeting/plugins";
repo = "aws";
rev = "refs/tags/v${version}";
hash = "sha256-8vEduf+xh9R3+GoouXJS2h/ELlzKXDmLBLekaXGn7SE=";
};

vendorHash = "sha256-bfEzPPP280peOK4Jyu1fyfFCaFnRLoPmsjJ+G1BoVW4=";

subPackages = [ "cmd/fleeting-plugin-aws" ];

# See https://gitlab.com/gitlab-org/fleeting/plugins/aws/-/blob/v1.0.0/Makefile?ref_type=tags#L20-22.
#
# Needed for "fleeting-plugin-aws version" to not show "dev".
ldflags =
let
# See https://gitlab.com/gitlab-org/fleeting/plugins/aws/-/blob/v1.0.0/Makefile?ref_type=tags#L14.
#
# Couldn't find a way to substitute "go list ." into "ldflags".
ldflagsPackageVariablePrefix = "gitlab.com/gitlab-org/fleeting/plugins/aws";
in
[
"-X ${ldflagsPackageVariablePrefix}.NAME=fleeting-plugin-aws"
"-X ${ldflagsPackageVariablePrefix}.VERSION=v${version}"
"-X ${ldflagsPackageVariablePrefix}.REVISION=${src.rev}"
];

doInstallCheck = true;

nativeInstallCheckInputs = [ versionCheckHook ];

versionCheckProgramArg = "version";

passthru = {
updateScript = nix-update-script { };
};

meta = {
description = "GitLab fleeting plugin for AWS";
homepage = "https://gitlab.com/gitlab-org/fleeting/plugins/aws";
license = lib.licenses.mit;
mainProgram = "fleeting-plugin-aws";
# TODO: Find maintainer(s).
maintainers = with lib.maintainers; [ ];
};
}

0 comments on commit 22708d2

Please sign in to comment.