2021-09-12 01:51:26 +01:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub }:
|
2021-09-11 21:55:55 +01:00
|
|
|
|
2021-09-21 03:36:19 +01:00
|
|
|
buildGoModule rec {
|
2021-09-11 21:55:55 +01:00
|
|
|
pname = "cni-plugin-flannel";
|
2021-10-29 19:03:25 +01:00
|
|
|
version = "1.0.0";
|
2021-09-11 21:55:55 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "flannel-io";
|
|
|
|
repo = "cni-plugin";
|
2021-09-21 03:36:19 +01:00
|
|
|
rev = "v${version}";
|
2021-10-29 19:03:25 +01:00
|
|
|
sha256 = "sha256-zWxw4LZIlkT88yGTnxdupq7cUSacNRxPzzp01O9USDw=";
|
2021-09-11 21:55:55 +01:00
|
|
|
};
|
|
|
|
|
2021-10-29 19:03:25 +01:00
|
|
|
vendorSha256 = "sha256-zteMlrvRTVxOFlBy+z/qfiSii8+c8PMapwIsdbN+Aig=";
|
2021-09-11 21:55:55 +01:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mv $out/bin/cni-plugin $out/bin/flannel
|
|
|
|
'';
|
|
|
|
|
|
|
|
doCheck = false;
|
2021-10-29 19:03:25 +01:00
|
|
|
doInstallCheck = true;
|
|
|
|
|
|
|
|
installCheckPhase = ''
|
|
|
|
runHook preInstallCheck
|
|
|
|
$out/bin/flannel 2>&1 | fgrep -q v$version
|
|
|
|
runHook postInstallCheck
|
|
|
|
'';
|
2021-09-11 21:55:55 +01: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 ];
|
|
|
|
};
|
|
|
|
}
|