nixpkgs/pkgs/servers/trickster/trickster.nix

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

51 lines
1.2 KiB
Nix
Raw Normal View History

2022-06-13 23:50:58 +01:00
{ lib
, buildGoModule
, fetchFromGitHub
, go
, nixosTests
2022-06-13 23:50:58 +01:00
}:
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
};
vendorHash = null;
2022-06-13 23:50:58 +01:00
subPackages = [ "cmd/trickster" ];
2024-08-16 22:10:57 +01:00
ldflags =
[ "-extldflags '-static'" "-s" "-w" ] ++
2024-08-16 22:10:57 +01:00
(lib.mapAttrsToList (n: v: "-X main.application${n}=${v}") {
BuildTime = "1970-01-01T00:00:00+0000";
GitCommitID = rev;
GoVersion = "go${go.version}}";
GoArch = "${go.GOARCH}";
});
2022-06-13 23:50:58 +01:00
# Tests are broken.
doCheck = false;
2019-11-01 09:56:59 +00:00
passthru.tests = { inherit (nixosTests) trickster; };
meta = with lib; {
2022-06-13 23:50:58 +01:00
description = "Reverse proxy cache and time series dashboard accelerator";
mainProgram = "trickster";
2022-06-13 23:50:58 +01: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 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
};
}