3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/tools/skaffold/default.nix

40 lines
1 KiB
Nix
Raw Normal View History

{ lib, buildGoPackage, fetchFromGitHub, installShellFiles }:
buildGoPackage rec {
2019-08-26 17:52:37 +01:00
pname = "skaffold";
2020-10-02 15:26:06 +01:00
version = "1.15.0";
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
-X ${t}/version.version=v${version}
2020-07-03 02:24:17 +01:00
-X ${t}/version.gitCommit=${src.rev}
-X ${t}/version.buildDate=unknown
'';
src = fetchFromGitHub {
owner = "GoogleContainerTools";
repo = "skaffold";
rev = "v${version}";
2020-10-03 12:36:00 +01:00
sha256 = "0cir9ld61pq1rziw6vyz1ihkq0aylzrsxg1vqb9544rwnbq7z2qs";
};
nativeBuildInputs = [ installShellFiles ];
postInstall = ''
for shell in bash zsh; do
$out/bin/skaffold completion $shell > skaffold.$shell
installShellCompletion skaffold.$shell
done
'';
meta = with lib; {
description = "Easy and Repeatable Kubernetes Development";
homepage = "https://skaffold.dev/";
license = licenses.asl20;
maintainers = with maintainers; [ vdemeester ];
};
}