nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 39 lines 1.1 kB view raw
1{ 2 lib, 3 buildGoModule, 4 fetchFromGitHub, 5 stdenv, 6 installShellFiles, 7}: 8 9buildGoModule (finalAttrs: { 10 pname = "gotlsaflare"; 11 version = "2.7.3"; 12 13 src = fetchFromGitHub { 14 owner = "Stenstromen"; 15 repo = "gotlsaflare"; 16 tag = "v${finalAttrs.version}"; 17 hash = "sha256-OmjbXek62i0CrbwIXR13tDrZlWPMwO10ciUQ5kTd3gU="; 18 }; 19 20 vendorHash = "sha256-BAN2KzzmAk8dYvD1Uw94junawlvmVbSx6AQ7flxn18g="; 21 22 nativeBuildInputs = [ installShellFiles ]; 23 24 postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' 25 installShellCompletion --cmd gotlsaflare \ 26 --bash <($out/bin/gotlsaflare completion bash) \ 27 --fish <($out/bin/gotlsaflare completion fish) \ 28 --zsh <($out/bin/gotlsaflare completion zsh) 29 ''; 30 31 meta = { 32 description = "Update TLSA DANE records on cloudflare from x509 certificates"; 33 homepage = "https://github.com/Stenstromen/gotlsaflare"; 34 changelog = "https://github.com/Stenstromen/gotlsaflare/releases/tag/${finalAttrs.src.tag}"; 35 license = lib.licenses.mit; 36 maintainers = with lib.maintainers; [ szlend ]; 37 mainProgram = "gotlsaflare"; 38 }; 39})