multus-cni: fix version ouput, clean up

This commit is contained in:
figsoda 2021-09-30 22:50:30 -04:00
parent f5a2a8f285
commit af9b4c3aee

View file

@ -1,4 +1,4 @@
{ lib, fetchFromGitHub, buildGoModule }: { lib, buildGoModule, fetchFromGitHub }:
buildGoModule rec { buildGoModule rec {
pname = "multus-cni"; pname = "multus-cni";
@ -11,15 +11,14 @@ buildGoModule rec {
sha256 = "sha256-wG6SRts3+bmeMkfScyNorsBvRl/hxe+CUnL0rwfknpc="; sha256 = "sha256-wG6SRts3+bmeMkfScyNorsBvRl/hxe+CUnL0rwfknpc=";
}; };
ldflags = let ldflags = [
multus = "gopkg.in/intel/multus-cni.v3/pkg/multus"; "-s"
commit = "f6298a3a294a79f9fbda0b8f175e521799d5f8d7"; "-w"
in [ "-X=gopkg.in/k8snetworkplumbingwg/multus-cni.v3/pkg/multus.version=${version}"
"-s" "-w" "-X ${multus}.version=v${version}" "-X ${multus}.commit=${commit}"
]; ];
preInstall = '' preInstall = ''
mv $GOPATH/bin/cmd $GOPATH/bin/multus mv $GOPATH/bin/cmd $GOPATH/bin/multus
''; '';
vendorSha256 = null; vendorSha256 = null;
@ -28,10 +27,11 @@ buildGoModule rec {
doCheck = false; doCheck = false;
meta = with lib; { meta = with lib; {
description = "Multus CNI is a container network interface (CNI) plugin for Kubernetes that enables attaching multiple network interfaces to pods. "; description = "Multus CNI is a container network interface (CNI) plugin for Kubernetes that enables attaching multiple network interfaces to pods";
homepage = "https://github.com/k8snetworkplumbingwg/multus-cni"; homepage = "https://github.com/k8snetworkplumbingwg/multus-cni";
license = licenses.asl20; license = licenses.asl20;
platforms = platforms.linux; platforms = platforms.linux;
maintainers = with maintainers; [ onixie ]; maintainers = with maintainers; [ onixie ];
mainProgram = "multus";
}; };
} }