2020-04-24 23:36:52 +00:00
|
|
|
{ lib, buildGoPackage, fetchFromGitHub, installShellFiles }:
|
|
|
|
|
|
|
|
buildGoPackage rec {
|
|
|
|
pname = "skaffold";
|
2020-05-29 06:06:01 +00:00
|
|
|
version = "1.9.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
# rev is the ${version} commit, mainly for skaffold version command output
|
2020-05-29 06:06:01 +00:00
|
|
|
rev = "7bac6a150c9618465f5ad38cc0a5dbc4677c39ba";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
goPackagePath = "github.com/GoogleContainerTools/skaffold";
|
|
|
|
subPackages = ["cmd/skaffold"];
|
|
|
|
|
|
|
|
buildFlagsArray = let t = "${goPackagePath}/pkg/skaffold"; in ''
|
|
|
|
-ldflags=
|
|
|
|
-X ${t}/version.version=v${version}
|
|
|
|
-X ${t}/version.gitCommit=${rev}
|
|
|
|
-X ${t}/version.buildDate=unknown
|
|
|
|
'';
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "GoogleContainerTools";
|
|
|
|
repo = "skaffold";
|
|
|
|
rev = "v${version}";
|
2020-05-29 06:06:01 +00:00
|
|
|
sha256 = "0l0x89xv5brinafrvbz6hgs5kvmpl4ajcrsjdjh3myf7i0mvh3gm";
|
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 ];
|
|
|
|
};
|
|
|
|
}
|