mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-02 21:10:08 +00:00
40 lines
1.1 KiB
Nix
40 lines
1.1 KiB
Nix
{
|
|
lib,
|
|
buildGoModule,
|
|
fetchFromGitHub,
|
|
stdenv,
|
|
installShellFiles,
|
|
}:
|
|
|
|
buildGoModule (finalAttrs: {
|
|
pname = "gotlsaflare";
|
|
version = "2.8.4";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "Stenstromen";
|
|
repo = "gotlsaflare";
|
|
tag = "v${finalAttrs.version}";
|
|
hash = "sha256-LDUrLeIgEr0IaYUHRdPtk2soYGbPAycQcroIUMrmVKg=";
|
|
};
|
|
|
|
vendorHash = "sha256-btvgwiYm+ccT9BPVO42bxidKfOBDrBMT3WidDlMi17k=";
|
|
|
|
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";
|
|
};
|
|
})
|