2022-06-13 22:50:58 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildGoModule,
|
|
|
|
fetchFromGitHub,
|
2024-01-07 10:10:58 +00:00
|
|
|
go,
|
2024-08-17 22:29:43 +00:00
|
|
|
nixosTests,
|
2022-06-13 22:50:58 +00:00
|
|
|
}:
|
2019-11-01 09:56:59 +00:00
|
|
|
|
2022-06-13 22:50:58 +00:00
|
|
|
buildGoModule rec {
|
2019-11-01 09:56:59 +00:00
|
|
|
pname = "trickster";
|
2022-06-13 22:50:58 +00:00
|
|
|
version = "1.1.5";
|
|
|
|
rev = "4595bd6a1ae1165ef497251ad85c646dadc8a925";
|
2019-11-01 09:56:59 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2022-06-13 22:50:58 +00:00
|
|
|
owner = "trickstercache";
|
|
|
|
repo = "trickster";
|
2019-11-01 09:56:59 +00:00
|
|
|
rev = "v${version}";
|
2022-06-13 22:50:58 +00:00
|
|
|
sha256 = "sha256-BRD8IF3s9RaDorVtXRvbKLVVVXWiEQTQyKBR9jFo1eM=";
|
2019-11-01 09:56:59 +00:00
|
|
|
};
|
|
|
|
|
2023-09-21 17:11:11 +00:00
|
|
|
vendorHash = null;
|
2022-06-13 22:50:58 +00:00
|
|
|
|
|
|
|
subPackages = [ "cmd/trickster" ];
|
|
|
|
|
2024-08-16 21:10:57 +00:00
|
|
|
ldflags =
|
2024-01-07 10:10:58 +00:00
|
|
|
[
|
|
|
|
"-extldflags '-static'"
|
|
|
|
"-s"
|
|
|
|
"-w"
|
|
|
|
]
|
2024-08-16 21:10:57 +00:00
|
|
|
++ (lib.mapAttrsToList (n: v: "-X main.application${n}=${v}") {
|
2024-01-07 10:10:58 +00:00
|
|
|
BuildTime = "1970-01-01T00:00:00+0000";
|
|
|
|
GitCommitID = rev;
|
|
|
|
GoVersion = "go${go.version}}";
|
|
|
|
GoArch = "${go.GOARCH}";
|
|
|
|
});
|
2022-06-13 22:50:58 +00:00
|
|
|
|
|
|
|
# Tests are broken.
|
|
|
|
doCheck = false;
|
2019-11-01 09:56:59 +00:00
|
|
|
|
2024-08-17 22:29:43 +00:00
|
|
|
passthru.tests = { inherit (nixosTests) trickster; };
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2022-06-13 22:50:58 +00:00
|
|
|
description = "Reverse proxy cache and time series dashboard accelerator";
|
2024-03-19 02:14:51 +00:00
|
|
|
mainProgram = "trickster";
|
2022-06-13 22:50:58 +00:00
|
|
|
longDescription = ''
|
|
|
|
Trickster is a fully-featured HTTP Reverse Proxy Cache for HTTP
|
|
|
|
applications like static file servers and web APIs.
|
|
|
|
'';
|
|
|
|
homepage = "https://trickstercache.org/";
|
2019-11-01 09:56:59 +00:00
|
|
|
license = licenses.asl20;
|
2020-07-29 10:57:20 +00:00
|
|
|
maintainers = with maintainers; [ _1000101 ];
|
2022-06-13 22:50:58 +00:00
|
|
|
platforms = platforms.linux;
|
2019-11-01 09:56:59 +00:00
|
|
|
};
|
2020-07-31 04:07:43 +00:00
|
|
|
}
|