2020-02-22 22:04:57 +00:00
|
|
|
{ lib, buildGoPackage, fetchFromGitHub, installShellFiles }:
|
2018-10-19 08:11:45 +01:00
|
|
|
|
|
|
|
buildGoPackage rec {
|
2019-08-26 17:52:37 +01:00
|
|
|
pname = "skaffold";
|
2020-11-26 20:37:51 +00:00
|
|
|
version = "1.17.0";
|
2018-10-19 08:11:45 +01:00
|
|
|
|
|
|
|
goPackagePath = "github.com/GoogleContainerTools/skaffold";
|
|
|
|
subPackages = ["cmd/skaffold"];
|
|
|
|
|
|
|
|
buildFlagsArray = let t = "${goPackagePath}/pkg/skaffold"; in ''
|
|
|
|
-ldflags=
|
2020-07-03 02:24:17 +01:00
|
|
|
-s -w
|
2018-10-19 08:11:45 +01:00
|
|
|
-X ${t}/version.version=v${version}
|
2020-07-03 02:24:17 +01:00
|
|
|
-X ${t}/version.gitCommit=${src.rev}
|
2018-10-19 08:11:45 +01:00
|
|
|
-X ${t}/version.buildDate=unknown
|
|
|
|
'';
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "GoogleContainerTools";
|
|
|
|
repo = "skaffold";
|
|
|
|
rev = "v${version}";
|
2020-11-26 20:37:51 +00:00
|
|
|
sha256 = "0i86bymwfnqnvp6na6na5dmjzp3dp7l416irkllh3i5wgvppda7m";
|
2018-10-19 08:11:45 +01:00
|
|
|
};
|
|
|
|
|
2020-02-22 22:04:57 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
postInstall = ''
|
|
|
|
for shell in bash zsh; do
|
2020-04-28 02:50:57 +01:00
|
|
|
$out/bin/skaffold completion $shell > skaffold.$shell
|
2020-02-22 22:04:57 +00:00
|
|
|
installShellCompletion skaffold.$shell
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
2018-10-19 08:11:45 +01:00
|
|
|
description = "Easy and Repeatable Kubernetes Development";
|
2020-02-22 22:04:57 +00:00
|
|
|
homepage = "https://skaffold.dev/";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ vdemeester ];
|
2018-10-19 08:11:45 +01:00
|
|
|
};
|
|
|
|
}
|