2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
fetchFromGitHub,
|
|
|
|
buildGoModule,
|
|
|
|
testers,
|
|
|
|
stackql,
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "stackql";
|
2024-10-23 06:41:50 +00:00
|
|
|
version = "0.5.748";
|
2024-06-05 15:53:02 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "stackql";
|
|
|
|
repo = "stackql";
|
|
|
|
rev = "v${version}";
|
2024-10-23 06:41:50 +00:00
|
|
|
hash = "sha256-3nt0hGBbS99WCRs3WnaB+0T/DS/uWROigYhXJw0fms8=";
|
2024-06-05 15:53:02 +00:00
|
|
|
};
|
|
|
|
|
2024-10-23 06:41:50 +00:00
|
|
|
vendorHash = "sha256-oIpkhZHqg02qs68/ljuhNkw0BiIkY++du/pJRHXlPs0=";
|
2024-06-05 15:53:02 +00:00
|
|
|
|
|
|
|
ldflags = [
|
|
|
|
"-s"
|
|
|
|
"-w"
|
|
|
|
"-X github.com/stackql/stackql/internal/stackql/cmd.BuildMajorVersion=${builtins.elemAt (lib.splitVersion version) 0}"
|
|
|
|
"-X github.com/stackql/stackql/internal/stackql/cmd.BuildMinorVersion=${builtins.elemAt (lib.splitVersion version) 1}"
|
|
|
|
"-X github.com/stackql/stackql/internal/stackql/cmd.BuildPatchVersion=${builtins.elemAt (lib.splitVersion version) 2}"
|
|
|
|
"-X github.com/stackql/stackql/internal/stackql/cmd.BuildDate=2024-05-15T07:51:52Z" # date of commit hash
|
|
|
|
"-X stackql/internal/stackql/planbuilder.PlanCacheEnabled=true"
|
|
|
|
];
|
|
|
|
|
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
|
|
|
checkFlags = [ "--tags json1,sqleanal" ];
|
|
|
|
|
|
|
|
passthru.tests.version = testers.testVersion {
|
|
|
|
package = stackql;
|
|
|
|
version = "v${version}";
|
|
|
|
};
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = "https://github.com/stackql/stackql";
|
|
|
|
description = "Deploy, manage and query cloud resources and interact with APIs using SQL";
|
|
|
|
mainProgram = "stackql";
|
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = with lib.maintainers; [ jonochang ];
|
|
|
|
};
|
|
|
|
}
|