2022-11-11 09:47:11 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, fetchpatch, installShellFiles, testers, kompose, git }:
|
2017-11-25 14:24:52 +00:00
|
|
|
|
2022-04-04 14:35:00 +00:00
|
|
|
buildGoModule rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "kompose";
|
2022-04-04 14:35:00 +00:00
|
|
|
version = "1.26.1";
|
2017-11-25 14:24:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "kubernetes";
|
|
|
|
repo = "kompose";
|
2022-04-04 14:35:00 +00:00
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "sha256-NfzqGG5ZwPpmjhvcvXN1AA+kfZG/oujbAEtXkm1mzeU=";
|
2017-11-25 14:24:52 +00:00
|
|
|
};
|
|
|
|
|
2022-11-11 09:47:11 +00:00
|
|
|
vendorHash = "sha256-/i4R50heqf0v2F2GTZCKGq10+xKKr+zPkqWKa+afue8=";
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/kubernetes/kompose/commit/0964a7ccd16504b6e5ef49a07978c87cca803d46.patch";
|
|
|
|
hash = "sha256-NMHLxx7Ae6Z+pacj538ivxIby7rNz3IbfDPbeLA0sMc=";
|
|
|
|
})
|
|
|
|
];
|
2022-04-04 14:35:00 +00:00
|
|
|
|
2022-05-01 23:15:08 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles git ];
|
2022-04-04 14:35:00 +00:00
|
|
|
|
|
|
|
ldflags = [ "-s" "-w" ];
|
|
|
|
|
|
|
|
checkFlags = [ "-short" ];
|
|
|
|
|
2020-01-31 10:29:24 +00:00
|
|
|
postInstall = ''
|
2020-04-26 03:16:51 +00:00
|
|
|
for shell in bash zsh; do
|
2020-04-28 01:50:57 +00:00
|
|
|
$out/bin/kompose completion $shell > kompose.$shell
|
2020-04-26 03:16:51 +00:00
|
|
|
installShellCompletion kompose.$shell
|
|
|
|
done
|
2020-01-31 10:29:24 +00:00
|
|
|
'';
|
|
|
|
|
2022-04-26 07:58:49 +00:00
|
|
|
passthru.tests.version = testers.testVersion {
|
2022-04-04 14:35:00 +00:00
|
|
|
package = kompose;
|
|
|
|
command = "kompose version";
|
|
|
|
};
|
|
|
|
|
2020-02-27 13:29:12 +00:00
|
|
|
meta = with lib; {
|
2017-11-25 14:24:52 +00:00
|
|
|
description = "A tool to help users who are familiar with docker-compose move to Kubernetes";
|
2020-02-27 13:29:12 +00:00
|
|
|
homepage = "https://kompose.io";
|
2017-11-25 14:24:52 +00:00
|
|
|
license = licenses.asl20;
|
2019-03-23 23:55:09 +00:00
|
|
|
maintainers = with maintainers; [ thpham vdemeester ];
|
2017-11-25 14:24:52 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|