2021-09-12 02:51:26 +02:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub }:
|
2021-09-11 22:55:55 +02:00
|
|
|
|
2021-09-21 04:36:19 +02:00
|
|
|
buildGoModule rec {
|
2021-09-11 22:55:55 +02:00
|
|
|
pname = "cni-plugin-flannel";
|
2021-10-29 20:03:25 +02:00
|
|
|
version = "1.0.0";
|
2021-09-11 22:55:55 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "flannel-io";
|
|
|
|
repo = "cni-plugin";
|
2021-09-21 04:36:19 +02:00
|
|
|
rev = "v${version}";
|
2021-10-29 20:03:25 +02:00
|
|
|
sha256 = "sha256-zWxw4LZIlkT88yGTnxdupq7cUSacNRxPzzp01O9USDw=";
|
2021-09-11 22:55:55 +02:00
|
|
|
};
|
|
|
|
|
2021-10-29 20:03:25 +02:00
|
|
|
vendorSha256 = "sha256-zteMlrvRTVxOFlBy+z/qfiSii8+c8PMapwIsdbN+Aig=";
|
2021-09-11 22:55:55 +02:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mv $out/bin/cni-plugin $out/bin/flannel
|
|
|
|
'';
|
|
|
|
|
|
|
|
doCheck = false;
|
2021-10-29 20:03:25 +02:00
|
|
|
doInstallCheck = true;
|
|
|
|
|
|
|
|
installCheckPhase = ''
|
|
|
|
runHook preInstallCheck
|
|
|
|
$out/bin/flannel 2>&1 | fgrep -q v$version
|
|
|
|
runHook postInstallCheck
|
|
|
|
'';
|
2021-09-11 22:55:55 +02:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "flannel CNI plugin";
|
|
|
|
homepage = "https://github.com/flannel-io/cni-plugin/";
|
|
|
|
license = licenses.asl20;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ abbe ];
|
|
|
|
};
|
|
|
|
}
|