From e2840c584041c7d41ae7abeffd875a28baa35f98 Mon Sep 17 00:00:00 2001 From: Azat Bahawi Date: Fri, 2 Sep 2022 23:43:11 +0300 Subject: [PATCH] trdl-client: init at 0.5.0 --- pkgs/tools/misc/trdl-client/default.nix | 70 +++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 72 insertions(+) create mode 100644 pkgs/tools/misc/trdl-client/default.nix diff --git a/pkgs/tools/misc/trdl-client/default.nix b/pkgs/tools/misc/trdl-client/default.nix new file mode 100644 index 00000000000..5a683ef2020 --- /dev/null +++ b/pkgs/tools/misc/trdl-client/default.nix @@ -0,0 +1,70 @@ +{ lib +, buildGoModule +, fetchFromGitHub +, testers +, trdl-client +}: + +buildGoModule rec { + pname = "trdl-client"; + version = "0.5.0"; + + src = fetchFromGitHub { + owner = "werf"; + repo = "trdl"; + rev = "v${version}"; + hash = "sha256-6bJoM0s0lIZewERCNnm5+J5O+Tkzp+Pv2l4vvOSxIz8="; + }; + + sourceRoot = "source/client"; + + vendorHash = "sha256-j3WekQpnwbh+XiFgJlEr/Cw+2WloIw+iELsqk5Cy69g="; + + subPackages = [ "cmd/trdl" ]; + + CGO_ENABLED = 0; + + ldflags = [ + "-s" + "-w" + "-X github.com/werf/trdl/client/pkg/trdl.Version=${src.rev}" + ]; + + tags = [ + "dfrunmount" + "dfssh" + ]; + + # There are no tests for cmd/trdl. + doCheck = false; + + passthru.tests.version = testers.testVersion { + package = trdl-client; + command = "trdl version"; + version = "v${version}"; + }; + + meta = with lib; { + description = '' + The universal solution for delivering your software updates securely from + a trusted The Update Framework (TUF) repository + ''; + longDescription = '' + trdl is an Open Source solution providing a secure channel for delivering + updates from the Git repository to the end user. + + The project team releases new versions of the software and switches them + in the release channels. Git acts as the single source of truth while + Vault is used as a tool to verify operations as well as populate and + maintain the TUF repository. + + The user selects a release channel, continuously receives the latest + software version from the TUF repository, and uses it. + ''; + homepage = "https://trdl.dev"; + changelog = "https://github.com/werf/trdl/releases/tag/${src.rev}"; + license = licenses.asl20; + maintainers = with maintainers; [ azahi ]; + mainProgram = "trdl"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c85ae541340..8aebb4b118c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -11626,6 +11626,8 @@ with pkgs; trashy = callPackage ../tools/misc/trashy { }; + trdl-client = callPackage ../tools/misc/trdl-client { }; + trenchbroom = libsForQt5.callPackage ../applications/misc/trenchbroom { inherit (xorg) libXxf86vm; };