2020-02-22 22:04:57 +00:00
|
|
|
{ lib, buildGoPackage, fetchFromGitHub, installShellFiles }:
|
2018-10-19 07:11:45 +00:00
|
|
|
|
|
|
|
buildGoPackage rec {
|
2019-08-26 16:52:37 +00:00
|
|
|
pname = "skaffold";
|
2020-07-31 09:42:34 +00:00
|
|
|
version = "1.12.1";
|
2018-10-19 07:11:45 +00:00
|
|
|
|
|
|
|
goPackagePath = "github.com/GoogleContainerTools/skaffold";
|
|
|
|
subPackages = ["cmd/skaffold"];
|
|
|
|
|
|
|
|
buildFlagsArray = let t = "${goPackagePath}/pkg/skaffold"; in ''
|
|
|
|
-ldflags=
|
2020-07-03 01:24:17 +00:00
|
|
|
-s -w
|
2018-10-19 07:11:45 +00:00
|
|
|
-X ${t}/version.version=v${version}
|
2020-07-03 01:24:17 +00:00
|
|
|
-X ${t}/version.gitCommit=${src.rev}
|
2018-10-19 07:11:45 +00:00
|
|
|
-X ${t}/version.buildDate=unknown
|
|
|
|
'';
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "GoogleContainerTools";
|
|
|
|
repo = "skaffold";
|
|
|
|
rev = "v${version}";
|
2020-07-31 09:42:34 +00:00
|
|
|
sha256 = "1mk4mn9h44v2xs65jjslmi03j3bixg0fkn396hmxp718w68850lz";
|
2018-10-19 07:11:45 +00:00
|
|
|
};
|
|
|
|
|
2020-02-22 22:04:57 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
postInstall = ''
|
|
|
|
for shell in bash zsh; do
|
2020-04-28 01:50:57 +00: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 07:11:45 +00: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 07:11:45 +00:00
|
|
|
};
|
|
|
|
}
|