{ lib, fetchFromGitHub, buildGoModule, nixosTests, }: buildGoModule rec { pname = "lego"; version = "4.25.1"; src = fetchFromGitHub { owner = "go-acme"; repo = "lego"; tag = "v${version}"; hash = "sha256-71AaHvf2Vipmws38pcvZtsD+P6UX6dfY3d/4+0aOwVQ="; }; vendorHash = "sha256-8135PtcC98XxbdQnF58sglAgZUkuBA+A3bSxK0+tQ9U="; doCheck = false; subPackages = [ "cmd/lego" ]; ldflags = [ "-s" "-w" "-X main.version=${version}" ]; meta = with lib; { description = "Let's Encrypt client and ACME library written in Go"; license = licenses.mit; homepage = "https://go-acme.github.io/lego/"; teams = [ teams.acme ]; mainProgram = "lego"; }; passthru.tests = { lego-http = nixosTests.acme.http01-builtin; lego-dns = nixosTests.acme.dns01; }; }