blob: 9ae805bcdbc0bee1dc1aeb36fc5c74b801ee87c3 (
about) (
plain)
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
{
lib,
buildGoModule,
fetchFromGitLab,
nix-update-script,
versionCheckHook,
}:
buildGoModule (finalAttrs: {
pname = "fleeting-plugin-aws";
version = "1.0.1";
src = fetchFromGitLab {
owner = "gitlab-org/fleeting/plugins";
repo = "aws";
tag = "v${finalAttrs.version}";
hash = "sha256-3m7t2uGO7Rlfckb8mdYVutW0/ng0OiUAH5XTBoB//ZU=";
};
vendorHash = "sha256-hfuszGVWfMreGz22+dkx0/cxznjq2XZf7pAn4TWOQ5M=";
# Needed for "fleeting-plugin-aws -version" to not show "dev".
#
# https://gitlab.com/gitlab-org/fleeting/plugins/aws/-/blob/v1.0.0/Makefile?ref_type=tags#L20-22
ldflags =
let
ldflagsPackageVariablePrefix = "gitlab.com/gitlab-org/fleeting/plugins/aws";
in
[
"-X ${ldflagsPackageVariablePrefix}.NAME=fleeting-plugin-aws"
"-X ${ldflagsPackageVariablePrefix}.VERSION=${finalAttrs.version}"
"-X ${ldflagsPackageVariablePrefix}.REFERENCE=v${finalAttrs.version}"
];
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";
maintainers = with lib.maintainers; [ commiterate ];
};
})
|