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-03-28 19:20:31 +00:00
|
|
|
version = "1.6.0";
|
2020-02-22 22:04:57 +00:00
|
|
|
# rev is the ${version} commit, mainly for skaffold version command output
|
2020-03-28 19:20:31 +00:00
|
|
|
rev = "4cc0be23e41e37d8b1bca1464516538b2cc1bba0";
|
2018-10-19 08:11:45 +01: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-03-28 19:20:31 +00:00
|
|
|
sha256 = "0wz9x3p0hfajrkm1qrhl4kw7l7r3n6xv16chl4dxigaix8ga068h";
|
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
|
|
|
|
$bin/bin/skaffold completion $shell > skaffold.$shell
|
|
|
|
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
|
|
|
};
|
|
|
|
}
|