diff options
| author | Colin Arnott <colin@urandom.co.uk> | 2022-12-01 13:18:24 +0000 |
|---|---|---|
| committer | Colin Arnott <colin@urandom.co.uk> | 2022-12-27 13:10:42 +0000 |
| commit | 112fa92938583e841128d65d4637b409d00fc4a6 (patch) | |
| tree | aad6cff02829156590524c8d4b11ba314108be43 | |
| parent | Merge pull request #201568 from ncfavier/df (diff) | |
| download | nixpkgs-112fa92938583e841128d65d4637b409d00fc4a6.tar.gz | |
calico-various,calicoctl,confd-calico: init at 3.24.5
As calico internally builds a series of images, and multiple images
contain different calico binaries, we have had to segregate the various
components into different derivations. We have also used these image's
CMD or ENTRYPOINT as the mainProgram, so that nix run is more useful.
The cgo build process also proved to be quite tricky, so for now
calico-felix and calico-node, both of which depend on libbpf, have not
been packaged.
Updates #124071
| -rw-r--r-- | pkgs/applications/networking/cluster/calico/default.nix | 81 | ||||
| -rw-r--r-- | pkgs/top-level/all-packages.nix | 11 |
2 files changed, 92 insertions, 0 deletions
diff --git a/pkgs/applications/networking/cluster/calico/default.nix b/pkgs/applications/networking/cluster/calico/default.nix new file mode 100644 index 000000000000..192899ff1b22 --- /dev/null +++ b/pkgs/applications/networking/cluster/calico/default.nix @@ -0,0 +1,81 @@ +{ lib, buildGoModule, fetchFromGitHub }: + +builtins.mapAttrs (pname: { doCheck ? true, mainProgram ? pname, subPackages }: buildGoModule rec { + inherit pname; + version = "3.24.5"; + + src = fetchFromGitHub { + owner = "projectcalico"; + repo = "calico"; + rev = "v${version}"; + hash = "sha256-fB9FHiIqVieVkPfHmBvcaUmUqkT1ZbDT26+DUE9lbdc="; + }; + + vendorHash = "sha256-ogQ/REf5cngoGAFIBN++txew6UqOw1hqCVsixyuGtug="; + + inherit doCheck subPackages; + + ldflags = [ "-s" "-w" ]; + + meta = with lib; { + homepage = "https://projectcalico.docs.tigera.io"; + changelog = "https://github.com/projectcalico/calico/releases/tag/v${version}"; + description = "Cloud native networking and network security"; + license = licenses.asl20; + maintainers = with maintainers; [ urandom ]; + inherit mainProgram; + }; +}) { + calico-apiserver = { + mainProgram = "apiserver"; + subPackages = [ + "apiserver/cmd/..." + ]; + }; + calico-app-policy = { + # integration tests require network + doCheck = false; + mainProgram = "dikastes"; + subPackages = [ + "app-policy/cmd/..." + ]; + }; + calico-cni-plugin = { + mainProgram = "calico"; + subPackages = [ + "cni-plugin/cmd/..." + ]; + }; + calico-kube-controllers = { + # integration tests require network and docker + doCheck = false; + mainProgram = "kube-controllers"; + subPackages = [ + "kube-controllers/cmd/..." + ]; + }; + calico-pod2daemon = { + mainProgram = "flexvol"; + subPackages = [ + "pod2daemon/csidriver" + "pod2daemon/flexvol" + "pod2daemon/nodeagent" + ]; + }; + calico-typha = { + subPackages = [ + "typha/cmd/..." + ]; + }; + calicoctl = { + subPackages = [ + "calicoctl/calicoctl" + ]; + }; + confd-calico = { + mainProgram = "confd"; + subPackages = [ + "confd" + ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index be3c2791aafb..aaa21f17860a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -27822,6 +27822,17 @@ with pkgs; calibre-web = callPackage ../servers/calibre-web { }; + # calico-felix and calico-node have not been packaged due to libbpf, linking issues + inherit (callPackage ../applications/networking/cluster/calico {}) + calico-apiserver + calico-app-policy + calico-cni-plugin + calico-kube-controllers + calico-pod2daemon + calico-typha + calicoctl + confd-calico; + calligra = libsForQt5.callPackage ../applications/office/calligra { }; perkeep = callPackage ../applications/misc/perkeep { }; |
