Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 fetchFromGitHub, 4 buildGoModule, 5 versionCheckHook, 6 writableTmpDirAsHomeHook, 7}: 8 9buildGoModule (finalAttrs: { 10 pname = "andcli"; 11 version = "2.3.0"; 12 13 subPackages = [ "cmd/andcli" ]; 14 15 src = fetchFromGitHub { 16 owner = "tjblackheart"; 17 repo = "andcli"; 18 tag = "v${finalAttrs.version}"; 19 hash = "sha256-umV0oJ4sySnZzrIpRuTP/fT8a9nhkC1shVEfVVRpEyI="; 20 }; 21 22 vendorHash = "sha256-lzmkNxQUqktnl2Rpjgoa2yvAuGiMtVGNhiuF40how4o="; 23 24 ldflags = [ 25 "-s" 26 "-w" 27 "-X github.com/tjblackheart/andcli/v2/internal/buildinfo.Commit=${finalAttrs.src.tag}" 28 "-X github.com/tjblackheart/andcli/v2/internal/buildinfo.AppVersion=${finalAttrs.src.tag}" 29 ]; 30 31 nativeInstallCheckInputs = [ 32 writableTmpDirAsHomeHook 33 versionCheckHook 34 ]; 35 versionCheckProgramArg = "--version"; 36 versionCheckKeepEnvironment = [ "HOME" ]; 37 doInstallCheck = true; 38 39 meta = { 40 homepage = "https://github.com/tjblackheart/andcli"; 41 description = "2FA TUI for your shell"; 42 changelog = "https://github.com/tjblackheart/andcli/releases/tag/${finalAttrs.src.tag}"; 43 license = lib.licenses.mit; 44 maintainers = with lib.maintainers; [ Cameo007 ]; 45 mainProgram = "andcli"; 46 }; 47})