Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fleeting-plugin-aws: init at 1.0.0 #338276

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 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,59 @@
{
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";
platforms = lib.platforms.all;
# TODO: Find maintainer(s).
maintainers = with lib.maintainers; [ ];
Comment on lines +56 to +57
Copy link
Contributor Author

@commiterate commiterate Aug 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I probably won't be a reliable maintainer, so leaving out a maintainers list for now.

Would the GitLab maintainers team be interested in this? (cc: @globin @krav @talyz @yayayayaka)

I'll probably be adding GitLab's Nesting as well since this work is in preparation for a GitLab Runner fleet on AWS Mac metal instances with nested virtualization (example).

I can also create packages for the other Fleeting plugins (Google Cloud and Azure).

Copy link
Contributor Author

@commiterate commiterate Sep 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nesting PR: #338281

Blocked on the apple_sdk refactor.

This PR can be merged once we find a maintainer though.

};
}