{ lib, buildGoModule, fetchFromGitHub, stdenv, installShellFiles, }: buildGoModule (finalAttrs: { pname = "gotlsaflare"; version = "2.7.3"; src = fetchFromGitHub { owner = "Stenstromen"; repo = "gotlsaflare"; tag = "v${finalAttrs.version}"; hash = "sha256-OmjbXek62i0CrbwIXR13tDrZlWPMwO10ciUQ5kTd3gU="; }; vendorHash = "sha256-BAN2KzzmAk8dYvD1Uw94junawlvmVbSx6AQ7flxn18g="; nativeBuildInputs = [ installShellFiles ]; postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' installShellCompletion --cmd gotlsaflare \ --bash <($out/bin/gotlsaflare completion bash) \ --fish <($out/bin/gotlsaflare completion fish) \ --zsh <($out/bin/gotlsaflare completion zsh) ''; meta = { description = "Update TLSA DANE records on cloudflare from x509 certificates"; homepage = "https://github.com/Stenstromen/gotlsaflare"; changelog = "https://github.com/Stenstromen/gotlsaflare/releases/tag/${finalAttrs.src.tag}"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ szlend ]; mainProgram = "gotlsaflare"; }; })