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
This commit is contained in:
Colin Arnott
2022-12-27 13:10:42 +00:00
parent b33a7fa3fa
commit 112fa92938
2 changed files with 92 additions and 0 deletions
@@ -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"
];
};
}
+11
View File
@@ -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 { };