Files

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

50 lines
1.1 KiB
Nix
Raw Permalink Normal View History

2025-10-09 14:15:47 +02:00
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "cni-plugin-flannel";
version = "1.8.0-flannel1";
src = fetchFromGitHub {
owner = "flannel-io";
repo = "cni-plugin";
rev = "v${version}";
sha256 = "sha256-DaE8T/c1n5Mx/MvPXw+bXO+91Ux/bcWWAdbVmNhQXIo=";
};
vendorHash = "sha256-x4QoAXrMhzEqSNBvWl3/9Lb4JjDgwcoV9a0xEYcwKFI=";
ldflags = [
"-s"
"-w"
"-X main.Version=${version}"
"-X main.Commit=${version}"
"-X main.Program=flannel"
];
postInstall = ''
mv $out/bin/cni-plugin $out/bin/flannel
'';
doCheck = false;
doInstallCheck = true;
installCheckPhase = ''
runHook preInstallCheck
$out/bin/flannel 2>&1 | fgrep -q $version
runHook postInstallCheck
'';
meta = with lib; {
description = "Network fabric for containers designed to work in conjunction with flannel";
mainProgram = "flannel";
homepage = "https://github.com/flannel-io/cni-plugin/";
license = licenses.asl20;
platforms = platforms.linux;
maintainers = with maintainers; [ abbe ];
};
}