Merge pull request #307018 from bjornfor/cert-viewer-fix-cross-compilation

cert-viewer: fix cross-compilation
This commit is contained in:
Aleksana 2024-04-27 20:50:58 +08:00 committed by GitHub
commit 70412a707b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 13 additions and 4 deletions

View File

@ -1,7 +1,9 @@
{ buildGoModule
, buildPackages
, fetchFromGitHub
, lib
, installShellFiles
, stdenv
}:
buildGoModule rec {
@ -21,10 +23,17 @@ buildGoModule rec {
installShellFiles
];
postInstall = ''
$out/bin/cert-viewer --help-man > cert-viewer.1
installManPage cert-viewer.1
'';
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";