···11+{ lib
22+, buildGoModule
33+, fetchFromGitHub
44+, testers
55+, trdl-client
66+}:
77+88+buildGoModule rec {
99+ pname = "trdl-client";
1010+ version = "0.5.0";
1111+1212+ src = fetchFromGitHub {
1313+ owner = "werf";
1414+ repo = "trdl";
1515+ rev = "v${version}";
1616+ hash = "sha256-6bJoM0s0lIZewERCNnm5+J5O+Tkzp+Pv2l4vvOSxIz8=";
1717+ };
1818+1919+ sourceRoot = "source/client";
2020+2121+ vendorHash = "sha256-j3WekQpnwbh+XiFgJlEr/Cw+2WloIw+iELsqk5Cy69g=";
2222+2323+ subPackages = [ "cmd/trdl" ];
2424+2525+ CGO_ENABLED = 0;
2626+2727+ ldflags = [
2828+ "-s"
2929+ "-w"
3030+ "-X github.com/werf/trdl/client/pkg/trdl.Version=${src.rev}"
3131+ ];
3232+3333+ tags = [
3434+ "dfrunmount"
3535+ "dfssh"
3636+ ];
3737+3838+ # There are no tests for cmd/trdl.
3939+ doCheck = false;
4040+4141+ passthru.tests.version = testers.testVersion {
4242+ package = trdl-client;
4343+ command = "trdl version";
4444+ version = "v${version}";
4545+ };
4646+4747+ meta = with lib; {
4848+ description = ''
4949+ The universal solution for delivering your software updates securely from
5050+ a trusted The Update Framework (TUF) repository
5151+ '';
5252+ longDescription = ''
5353+ trdl is an Open Source solution providing a secure channel for delivering
5454+ updates from the Git repository to the end user.
5555+5656+ The project team releases new versions of the software and switches them
5757+ in the release channels. Git acts as the single source of truth while
5858+ Vault is used as a tool to verify operations as well as populate and
5959+ maintain the TUF repository.
6060+6161+ The user selects a release channel, continuously receives the latest
6262+ software version from the TUF repository, and uses it.
6363+ '';
6464+ homepage = "https://trdl.dev";
6565+ changelog = "https://github.com/werf/trdl/releases/tag/${src.rev}";
6666+ license = licenses.asl20;
6767+ maintainers = with maintainers; [ azahi ];
6868+ mainProgram = "trdl";
6969+ };
7070+}