···1+{ lib
2+, buildGoModule
3+, fetchFromGitHub
4+, testers
5+, trdl-client
6+}:
7+8+buildGoModule rec {
9+ pname = "trdl-client";
10+ version = "0.5.0";
11+12+ src = fetchFromGitHub {
13+ owner = "werf";
14+ repo = "trdl";
15+ rev = "v${version}";
16+ hash = "sha256-6bJoM0s0lIZewERCNnm5+J5O+Tkzp+Pv2l4vvOSxIz8=";
17+ };
18+19+ sourceRoot = "source/client";
20+21+ vendorHash = "sha256-j3WekQpnwbh+XiFgJlEr/Cw+2WloIw+iELsqk5Cy69g=";
22+23+ subPackages = [ "cmd/trdl" ];
24+25+ CGO_ENABLED = 0;
26+27+ ldflags = [
28+ "-s"
29+ "-w"
30+ "-X github.com/werf/trdl/client/pkg/trdl.Version=${src.rev}"
31+ ];
32+33+ tags = [
34+ "dfrunmount"
35+ "dfssh"
36+ ];
37+38+ # There are no tests for cmd/trdl.
39+ doCheck = false;
40+41+ passthru.tests.version = testers.testVersion {
42+ package = trdl-client;
43+ command = "trdl version";
44+ version = "v${version}";
45+ };
46+47+ meta = with lib; {
48+ description = ''
49+ The universal solution for delivering your software updates securely from
50+ a trusted The Update Framework (TUF) repository
51+ '';
52+ longDescription = ''
53+ trdl is an Open Source solution providing a secure channel for delivering
54+ updates from the Git repository to the end user.
55+56+ The project team releases new versions of the software and switches them
57+ in the release channels. Git acts as the single source of truth while
58+ Vault is used as a tool to verify operations as well as populate and
59+ maintain the TUF repository.
60+61+ The user selects a release channel, continuously receives the latest
62+ software version from the TUF repository, and uses it.
63+ '';
64+ homepage = "https://trdl.dev";
65+ changelog = "https://github.com/werf/trdl/releases/tag/${src.rev}";
66+ license = licenses.asl20;
67+ maintainers = with maintainers; [ azahi ];
68+ mainProgram = "trdl";
69+ };
70+}