nixpkgs/pkgs/servers/trickster/trickster.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

54 lines
1.3 KiB
Nix
Raw Normal View History

2022-06-14 00:50:58 +02:00
{ lib
, buildGoModule
, fetchFromGitHub
}:
2019-11-01 10:56:59 +01:00
2022-06-14 00:50:58 +02:00
buildGoModule rec {
2019-11-01 10:56:59 +01:00
pname = "trickster";
2022-06-14 00:50:58 +02:00
version = "1.1.5";
rev = "4595bd6a1ae1165ef497251ad85c646dadc8a925";
2019-11-01 10:56:59 +01:00
src = fetchFromGitHub {
2022-06-14 00:50:58 +02:00
owner = "trickstercache";
repo = "trickster";
2019-11-01 10:56:59 +01:00
rev = "v${version}";
2022-06-14 00:50:58 +02:00
sha256 = "sha256-BRD8IF3s9RaDorVtXRvbKLVVVXWiEQTQyKBR9jFo1eM=";
2019-11-01 10:56:59 +01:00
};
2022-06-14 00:50:58 +02: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 10:56:59 +01:00
meta = with lib; {
2022-06-14 00:50:58 +02: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 10:56:59 +01:00
license = licenses.asl20;
2020-07-29 12:57:20 +02:00
maintainers = with maintainers; [ _1000101 ];
2022-06-14 00:50:58 +02:00
platforms = platforms.linux;
2019-11-01 10:56:59 +01:00
};
}