2022-06-13 23:50:58 +01:00
|
|
|
{ lib
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
}:
|
2019-11-01 09:56:59 +00:00
|
|
|
|
2022-06-13 23:50:58 +01:00
|
|
|
buildGoModule rec {
|
2019-11-01 09:56:59 +00:00
|
|
|
pname = "trickster";
|
2022-06-13 23:50:58 +01:00
|
|
|
version = "1.1.5";
|
|
|
|
rev = "4595bd6a1ae1165ef497251ad85c646dadc8a925";
|
2019-11-01 09:56:59 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2022-06-13 23:50:58 +01:00
|
|
|
owner = "trickstercache";
|
|
|
|
repo = "trickster";
|
2019-11-01 09:56:59 +00:00
|
|
|
rev = "v${version}";
|
2022-06-13 23:50:58 +01:00
|
|
|
sha256 = "sha256-BRD8IF3s9RaDorVtXRvbKLVVVXWiEQTQyKBR9jFo1eM=";
|
2019-11-01 09:56:59 +00:00
|
|
|
};
|
|
|
|
|
2022-06-13 23:50:58 +01:00
|
|
|
vendorSha256 = null;
|
|
|
|
|
|
|
|
subPackages = [ "cmd/trickster" ];
|
|
|
|
|
|
|
|
preBuild =
|
|
|
|
let
|
|
|
|
ldflags = with lib;
|
|
|
|
concatStringsSep " " (
|
|
|
|
[ "-extldflags '-static'" "-s" "-w" ] ++
|
|
|
|
(mapAttrsToList (n: v: "-X main.application${n}=${v}") {
|
|
|
|
BuildTime = "1970-01-01T00:00:00+0000";
|
|
|
|
GitCommitID = rev;
|
|
|
|
GoVersion = "$(go env GOVERSION)";
|
|
|
|
GoArch = "$(go env GOARCH)";
|
|
|
|
})
|
|
|
|
);
|
|
|
|
in
|
|
|
|
''
|
|
|
|
buildFlagsArray+=("-ldflags=${ldflags}")
|
|
|
|
'';
|
|
|
|
|
|
|
|
# Tests are broken.
|
|
|
|
doCheck = false;
|
2019-11-01 09:56:59 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2022-06-13 23:50:58 +01:00
|
|
|
description = "Reverse proxy cache and time series dashboard accelerator";
|
|
|
|
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 11:57:20 +01:00
|
|
|
maintainers = with maintainers; [ _1000101 ];
|
2022-06-13 23:50:58 +01:00
|
|
|
platforms = platforms.linux;
|
2019-11-01 09:56:59 +00:00
|
|
|
};
|
2020-07-31 05:07:43 +01:00
|
|
|
}
|