From 975172926bbf00069d77bf26f5105aaba5e91e80 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 6 Mar 2026 12:34:08 +0100 Subject: [PATCH] trajan: init at 1.0.0 Multi-platform CI/CD vulnerability detection and attack automation tool https://github.com/praetorian-inc/trajan --- pkgs/by-name/tr/trajan/package.nix | 42 ++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 pkgs/by-name/tr/trajan/package.nix diff --git a/pkgs/by-name/tr/trajan/package.nix b/pkgs/by-name/tr/trajan/package.nix new file mode 100644 index 000000000000..0c15022131fb --- /dev/null +++ b/pkgs/by-name/tr/trajan/package.nix @@ -0,0 +1,42 @@ +{ + lib, + buildGoModule, + fetchFromGitHub, + versionCheckHook, +}: + +buildGoModule (finalAttrs: { + pname = "trajan"; + version = "1.0.0"; + + src = fetchFromGitHub { + owner = "praetorian-inc"; + repo = "trajan"; + tag = "v${finalAttrs.version}"; + hash = "sha256-ji4IkImpDRQr8BuJCIqRfxyEWFD3Ux99D5lP3ALt+OQ="; + }; + + vendorHash = "sha256-Vr9MkEJZOIrryhGOWrUq76J8B7+2bzf5BOV4omVDIY8="; + + nativeInstallCheckInputs = [ versionCheckHook ]; + + ldflags = [ + "-s" + "-X=main.Version=${finalAttrs.version}" + "-X=main.GitCommit=${finalAttrs.src.rev}" + "-X=main.BuildDate=1970-01-01T00:00:00Z" + ]; + + doInstallCheck = true; + + versionCheckProgramArg = [ "version" ]; + + meta = { + description = "Multi-platform CI/CD vulnerability detection and attack automation tool"; + homepage = "https://github.com/praetorian-inc/trajan"; + changelog = "https://github.com/praetorian-inc/trajan/releases/tag/v${finalAttrs.src.rev}"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ fab ]; + mainProgram = "trajan"; + }; +})