mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 16:03:23 +00:00
Kubebuilder: init at 3.0.1
Kubebuilder is an SDK for building Kubernetes APIs using CRDs.
This commit is contained in:
parent
d856ea701b
commit
08ae5f5caf
49
pkgs/applications/networking/cluster/kubebuilder/default.nix
Normal file
49
pkgs/applications/networking/cluster/kubebuilder/default.nix
Normal file
@ -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 ];
|
||||
};
|
||||
}
|
@ -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;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user