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-10-02 14:26:06 +00:00
|
|
|
version = "1.15.0";
|
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-10-03 11:36:00 +00:00
|
|
|
sha256 = "0cir9ld61pq1rziw6vyz1ihkq0aylzrsxg1vqb9544rwnbq7z2qs";
|
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
|
|
|
};
|
|
|
|
}
|