Merge pull request #239775 from figsoda/karmor

karmor: fix version
This commit is contained in:
Weijia Wang 2023-06-26 15:45:06 +02:00 committed by GitHub
commit a67259409a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,4 +1,10 @@
{ buildGoModule, fetchFromGitHub, installShellFiles, lib }:
{ lib
, buildGoModule
, fetchFromGitHub
, installShellFiles
, testers
, karmor
}:
buildGoModule rec {
pname = "karmor";
@ -15,6 +21,13 @@ buildGoModule rec {
nativeBuildInputs = [ installShellFiles ];
ldflags = [
"-s"
"-w"
"-X=github.com/kubearmor/kubearmor-client/selfupdate.BuildDate=1970-01-01"
"-X=github.com/kubearmor/kubearmor-client/selfupdate.GitSummary=${version}"
];
# integration tests require network access
doCheck = false;
@ -26,6 +39,13 @@ buildGoModule rec {
--zsh <($out/bin/karmor completion zsh)
'';
passthru.tests = {
version = testers.testVersion {
package = karmor;
command = "karmor version || true";
};
};
meta = with lib; {
description = "A client tool to help manage KubeArmor";
homepage = "https://kubearmor.io";