2021-05-08 07:00:09 +01:00
|
|
|
{ lib, fetchFromGitHub, buildGoModule }:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "multus-cni";
|
2021-08-15 12:28:18 +01:00
|
|
|
version = "3.7.2";
|
2021-05-08 07:00:09 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "k8snetworkplumbingwg";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-08-15 12:28:18 +01:00
|
|
|
sha256 = "sha256-eVYRbMijOEa+DNCm4w/+WVrTI9607NF9/l5YKkXJuFs=";
|
2021-05-08 07:00:09 +01:00
|
|
|
};
|
|
|
|
|
2021-08-26 07:45:51 +01:00
|
|
|
ldflags = let
|
2021-05-08 07:00:09 +01:00
|
|
|
multus = "gopkg.in/intel/multus-cni.v3/pkg/multus";
|
|
|
|
commit = "f6298a3a294a79f9fbda0b8f175e521799d5f8d7";
|
|
|
|
in [
|
2021-08-26 07:45:51 +01:00
|
|
|
"-s" "-w" "-X ${multus}.version=v${version}" "-X ${multus}.commit=${commit}"
|
2021-05-08 07:00:09 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
preInstall = ''
|
|
|
|
mv $GOPATH/bin/cmd $GOPATH/bin/multus
|
|
|
|
'';
|
|
|
|
|
|
|
|
vendorSha256 = null;
|
|
|
|
|
|
|
|
# Some of the tests require accessing a k8s cluster
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
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";
|
|
|
|
license = licenses.asl20;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ onixie ];
|
|
|
|
};
|
|
|
|
}
|