depot/pkgs/by-name/ce/cert-viewer/package.nix
Luke Granger-Brown 57725ef3ec Squashed 'third_party/nixpkgs/' content from commit 76612b17c0ce
git-subtree-dir: third_party/nixpkgs
git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
2024-11-10 23:59:47 +00:00

45 lines
1 KiB
Nix

{ buildGoModule
, buildPackages
, fetchFromGitHub
, lib
, installShellFiles
, stdenv
}:
buildGoModule rec {
pname = "cert-viewer";
version = "0.9.1";
src = fetchFromGitHub {
owner = "mgit-at";
repo = "cert-viewer";
rev = "refs/tags/v${version}";
hash = "sha256-6IPr2BG3y/7cmc2WkeeFDpQ59GNU1eOhhm49HE2w0cA=";
};
vendorHash = "sha256-jNT04bYH5L/Zcfvel673zr2UJLayCO443tvBGZjrBZk=";
nativeBuildInputs = [
installShellFiles
];
postInstall =
let
prog =
if stdenv.buildPlatform.canExecute stdenv.hostPlatform
then "$out/bin/cert-viewer"
else lib.getExe buildPackages.cert-viewer;
in
''
${prog} --help-man > cert-viewer.1
installManPage cert-viewer.1
'';
meta = {
description = "Admin tool to view and inspect multiple x509 Certificates";
homepage = "https://github.com/mgit-at/cert-viewer";
license = lib.licenses.asl20;
maintainers = [ lib.maintainers.mkg20001 ];
mainProgram = "cert-viewer";
};
}