From d856ea701b26fdf984759067d5c1725b5515769a Mon Sep 17 00:00:00 2001 From: Casey Marshall Date: Sun, 6 Jun 2021 13:29:42 -0500 Subject: [PATCH 1/2] maintainers: add Casey Marshall --- maintainers/maintainer-list.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 2448ad3f93da..41ea89baffc1 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -1907,6 +1907,16 @@ githubId = 3392199; name = "Calum MacRae"; }; + cmars = { + email = "nix@cmars.tech"; + github = "cmars"; + githubId = 23741; + name = "Casey Marshall"; + keys = [{ + longkeyid = "rsa3072/0x6DEC2758ACD5A973"; + fingerprint = "6B78 7E5F B493 FA4F D009 5D10 6DEC 2758 ACD5 A973"; + }]; + }; cmcdragonkai = { email = "roger.qiu@matrix.ai"; github = "cmcdragonkai"; From 08ae5f5caf189708e48a8d2ddbdb77737549faf3 Mon Sep 17 00:00:00 2001 From: Casey Marshall Date: Sun, 6 Jun 2021 13:31:20 -0500 Subject: [PATCH 2/2] Kubebuilder: init at 3.0.1 Kubebuilder is an SDK for building Kubernetes APIs using CRDs. --- .../cluster/kubebuilder/default.nix | 49 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 51 insertions(+) create mode 100644 pkgs/applications/networking/cluster/kubebuilder/default.nix diff --git a/pkgs/applications/networking/cluster/kubebuilder/default.nix b/pkgs/applications/networking/cluster/kubebuilder/default.nix new file mode 100644 index 000000000000..d123790edd2f --- /dev/null +++ b/pkgs/applications/networking/cluster/kubebuilder/default.nix @@ -0,0 +1,49 @@ +{ lib +, buildGoModule +, fetchFromGitHub +, installShellFiles +, makeWrapper +, git +, go +}: + +buildGoModule rec { + pname = "kubebuilder"; + version = "3.1.0"; + + src = fetchFromGitHub { + owner = "kubernetes-sigs"; + repo = "kubebuilder"; + rev = "v${version}"; + sha256 = "1726j2b5jyvllvnk60g6px3g2jyyphd9pc4vgid45mis9b60sh8a"; + }; + vendorSha256 = "0zxyd950ksjswja64rfri5v2yaalfg6qmq8215ildgrcavl9974n"; + + subPackages = ["cmd" "pkg/..."]; + + preBuild = '' + export buildFlagsArray+=("-ldflags=-X main.kubeBuilderVersion=v${version} \ + -X main.goos=$GOOS \ + -X main.goarch=$GOARCH \ + -X main.gitCommit=v${version} \ + -X main.buildDate=v${version}") + ''; + + doCheck = true; + + postInstall = '' + mv $out/bin/cmd $out/bin/kubebuilder + wrapProgram $out/bin/kubebuilder \ + --prefix PATH : ${lib.makeBinPath [ go ]} + ''; + + allowGoReference = true; + nativeBuildInputs = [ makeWrapper git ]; + + meta = with lib; { + homepage = "https://github.com/kubernetes-sigs/kubebuilder"; + description = "SDK for building Kubernetes APIs using CRDs"; + license = licenses.asl20; + maintainers = with maintainers; [ cmars ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c537b0545a37..3de6116ac490 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -24780,6 +24780,8 @@ in kubectl = callPackage ../applications/networking/cluster/kubectl { }; + kubebuilder = callPackage ../applications/networking/cluster/kubebuilder { }; + kuttl = callPackage ../applications/networking/cluster/kuttl { buildGoModule = buildGo115Module; };