about summary refs log tree commit diff
path: root/pkgs/applications/networking/cluster/calico/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/networking/cluster/calico/default.nix')
-rw-r--r--pkgs/applications/networking/cluster/calico/default.nix81
1 files changed, 81 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 0000000000000..192899ff1b221
--- /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"
+    ];
+  };
+}