2020-04-24 23:36:52 +00:00
|
|
|
{ lib, buildGoPackage, fetchFromGitHub, installShellFiles }:
|
|
|
|
|
|
|
|
buildGoPackage rec {
|
|
|
|
pname = "skaffold";
|
2020-11-30 08:33:03 +00:00
|
|
|
version = "1.17.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
goPackagePath = "github.com/GoogleContainerTools/skaffold";
|
|
|
|
subPackages = ["cmd/skaffold"];
|
|
|
|
|
|
|
|
buildFlagsArray = let t = "${goPackagePath}/pkg/skaffold"; in ''
|
|
|
|
-ldflags=
|
2020-07-18 16:06:22 +00:00
|
|
|
-s -w
|
2020-04-24 23:36:52 +00:00
|
|
|
-X ${t}/version.version=v${version}
|
2020-07-18 16:06:22 +00:00
|
|
|
-X ${t}/version.gitCommit=${src.rev}
|
2020-04-24 23:36:52 +00:00
|
|
|
-X ${t}/version.buildDate=unknown
|
|
|
|
'';
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "GoogleContainerTools";
|
|
|
|
repo = "skaffold";
|
|
|
|
rev = "v${version}";
|
2020-11-30 08:33:03 +00:00
|
|
|
sha256 = "0i86bymwfnqnvp6na6na5dmjzp3dp7l416irkllh3i5wgvppda7m";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
postInstall = ''
|
|
|
|
for shell in bash zsh; do
|
2020-05-15 21:57:56 +00:00
|
|
|
$out/bin/skaffold completion $shell > skaffold.$shell
|
2020-04-24 23:36:52 +00:00
|
|
|
installShellCompletion skaffold.$shell
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Easy and Repeatable Kubernetes Development";
|
|
|
|
homepage = "https://skaffold.dev/";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ vdemeester ];
|
|
|
|
};
|
|
|
|
}
|