emacsPackages.lsp-bridge: 0-unstable-2025-01-11 -> 0-unstable-2025-01-22 (#376531)
[NixPkgs.git] / pkgs / tools / networking / flannel / plugin.nix
blob1d986666272e1ccffeb9080e2d558228dadcade3
2   lib,
3   buildGoModule,
4   fetchFromGitHub,
5 }:
7 buildGoModule rec {
8   pname = "cni-plugin-flannel";
9   version = "1.5.1-flannel3";
11   src = fetchFromGitHub {
12     owner = "flannel-io";
13     repo = "cni-plugin";
14     rev = "v${version}";
15     sha256 = "sha256-uYjBRfcNop84pbFoXxFa73GzC6U5wMxix3fTRFn7FsM=";
16   };
18   vendorHash = "sha256-ZBd7ngYfsmdSGHE9a0kiEB7SeYc9RfaU9MILK2r3cyg=";
20   ldflags = [
21     "-s"
22     "-w"
23     "-X main.Version=${version}"
24     "-X main.Commit=${version}"
25     "-X main.Program=flannel"
26   ];
28   postInstall = ''
29     mv $out/bin/cni-plugin $out/bin/flannel
30   '';
32   doCheck = false;
33   doInstallCheck = true;
35   installCheckPhase = ''
36     runHook preInstallCheck
37     $out/bin/flannel 2>&1 | fgrep -q $version
38     runHook postInstallCheck
39   '';
41   meta = with lib; {
42     description = "flannel CNI plugin";
43     mainProgram = "flannel";
44     homepage = "https://github.com/flannel-io/cni-plugin/";
45     license = licenses.asl20;
46     platforms = platforms.linux;
47     maintainers = with maintainers; [ abbe ];
48   };