nixpkgs/pkgs/by-name/ce/cert-viewer/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

46 lines
1.0 KiB
Nix
Raw Normal View History

2024-03-13 17:49:23 +00:00
{ buildGoModule
, buildPackages
2024-03-13 17:49:23 +00:00
, fetchFromGitHub
, lib
2024-04-23 10:26:06 +00:00
, installShellFiles
, stdenv
2024-03-13 17:49:23 +00:00
}:
buildGoModule rec {
pname = "cert-viewer";
2024-04-11 10:02:06 +00:00
version = "0.9.1";
2024-03-13 17:49:23 +00:00
src = fetchFromGitHub {
owner = "mgit-at";
repo = "cert-viewer";
rev = "refs/tags/v${version}";
2024-04-11 10:02:06 +00:00
hash = "sha256-6IPr2BG3y/7cmc2WkeeFDpQ59GNU1eOhhm49HE2w0cA=";
2024-03-13 17:49:23 +00:00
};
2024-04-11 10:02:06 +00:00
vendorHash = "sha256-jNT04bYH5L/Zcfvel673zr2UJLayCO443tvBGZjrBZk=";
2024-03-13 17:49:23 +00:00
2024-04-23 10:26:06 +00:00
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
'';
2024-04-23 10:26:06 +00:00
2024-03-13 17:49:23 +00:00
meta = {
description = "Admin tool to view and inspect multiple x509 Certificates";
homepage = "https://github.com/mgit-at/cert-viewer";
license = lib.licenses.asl20;
2024-03-13 17:49:23 +00:00
maintainers = [ lib.maintainers.mkg20001 ];
mainProgram = "cert-viewer";
};
}