40 lines
1.0 KiB
Nix
40 lines
1.0 KiB
Nix
{ lib, buildGoPackage, fetchFromGitHub, installShellFiles }:
|
|
|
|
buildGoPackage rec {
|
|
pname = "skaffold";
|
|
version = "1.17.2";
|
|
|
|
goPackagePath = "github.com/GoogleContainerTools/skaffold";
|
|
subPackages = ["cmd/skaffold"];
|
|
|
|
buildFlagsArray = let t = "${goPackagePath}/pkg/skaffold"; in ''
|
|
-ldflags=
|
|
-s -w
|
|
-X ${t}/version.version=v${version}
|
|
-X ${t}/version.gitCommit=${src.rev}
|
|
-X ${t}/version.buildDate=unknown
|
|
'';
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "GoogleContainerTools";
|
|
repo = "skaffold";
|
|
rev = "v${version}";
|
|
sha256 = "1sn4pmikap93kpdgcalgb3nam7zp60ck6wmynsv8dnzihrr7ycm3";
|
|
};
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
postInstall = ''
|
|
for shell in bash zsh; do
|
|
$out/bin/skaffold completion $shell > skaffold.$shell
|
|
installShellCompletion skaffold.$shell
|
|
done
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Easy and Repeatable Kubernetes Development";
|
|
homepage = "https://skaffold.dev/";
|
|
license = licenses.asl20;
|
|
maintainers = with maintainers; [ vdemeester ];
|
|
};
|
|
}
|