Merge pull request #167189 from aaronjheng/kompose

kompose: 1.21.0 -> 1.26.1
This commit is contained in:
Bobby Rong 2022-04-26 15:32:50 +08:00 committed by GitHub
commit 74d8a5b96f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,19 +1,24 @@
{ lib, buildGoPackage, fetchFromGitHub, installShellFiles }:
{ lib, buildGoModule, fetchFromGitHub, installShellFiles, testVersion, kompose }:
buildGoPackage rec {
buildGoModule rec {
pname = "kompose";
version = "1.21.0";
goPackagePath = "github.com/kubernetes/kompose";
version = "1.26.1";
src = fetchFromGitHub {
rev = "v${version}";
owner = "kubernetes";
repo = "kompose";
sha256 = "15a1alf6ywwfc4z5kdcnv64fp3cfy3qrcw62ny6xyn1kh1w24vkh";
rev = "v${version}";
sha256 = "sha256-NfzqGG5ZwPpmjhvcvXN1AA+kfZG/oujbAEtXkm1mzeU=";
};
vendorSha256 = "sha256-OR5U2PnebO0a+lwU09Dveh0Yxk91cmSRorTxQIO5lHc=";
nativeBuildInputs = [ installShellFiles ];
ldflags = [ "-s" "-w" ];
checkFlags = [ "-short" ];
postInstall = ''
for shell in bash zsh; do
$out/bin/kompose completion $shell > kompose.$shell
@ -21,6 +26,11 @@ buildGoPackage rec {
done
'';
passthru.tests.version = testVersion {
package = kompose;
command = "kompose version";
};
meta = with lib; {
description = "A tool to help users who are familiar with docker-compose move to Kubernetes";
homepage = "https://kompose.io";