2024-02-21 12:49:31 +01:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, installShellFiles, testers, kompose, git }:
|
2017-11-25 15:24:52 +01:00
|
|
|
|
2022-04-04 16:35:00 +02:00
|
|
|
buildGoModule rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "kompose";
|
2024-02-21 12:49:31 +01:00
|
|
|
version = "1.32.0";
|
2017-11-25 15:24:52 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "kubernetes";
|
|
|
|
repo = "kompose";
|
2022-04-04 16:35:00 +02:00
|
|
|
rev = "v${version}";
|
2024-02-21 12:49:31 +01:00
|
|
|
hash = "sha256-W9KAjyMp8fbnZunH5hwj0uctNYxEN/vbEDGaFJpv5hM=";
|
2017-11-25 15:24:52 +01:00
|
|
|
};
|
|
|
|
|
2024-02-21 12:49:31 +01:00
|
|
|
vendorHash = "sha256-nY0d3r3faowHa7ylqDkUrX6MrGW3g1jYjm1MLFW/jK8=";
|
2022-04-04 16:35:00 +02:00
|
|
|
|
2022-05-02 01:15:08 +02:00
|
|
|
nativeBuildInputs = [ installShellFiles git ];
|
2022-04-04 16:35:00 +02:00
|
|
|
|
|
|
|
ldflags = [ "-s" "-w" ];
|
|
|
|
|
|
|
|
checkFlags = [ "-short" ];
|
|
|
|
|
2020-01-31 11:29:24 +01:00
|
|
|
postInstall = ''
|
2020-04-26 05:16:51 +02:00
|
|
|
for shell in bash zsh; do
|
2020-04-28 03:50:57 +02:00
|
|
|
$out/bin/kompose completion $shell > kompose.$shell
|
2020-04-26 05:16:51 +02:00
|
|
|
installShellCompletion kompose.$shell
|
|
|
|
done
|
2020-01-31 11:29:24 +01:00
|
|
|
'';
|
|
|
|
|
2022-04-26 09:58:49 +02:00
|
|
|
passthru.tests.version = testers.testVersion {
|
2022-04-04 16:35:00 +02:00
|
|
|
package = kompose;
|
|
|
|
command = "kompose version";
|
|
|
|
};
|
|
|
|
|
2020-02-27 14:29:12 +01:00
|
|
|
meta = with lib; {
|
2017-11-25 15:24:52 +01:00
|
|
|
description = "A tool to help users who are familiar with docker-compose move to Kubernetes";
|
2024-03-19 03:14:51 +01:00
|
|
|
mainProgram = "kompose";
|
2020-02-27 14:29:12 +01:00
|
|
|
homepage = "https://kompose.io";
|
2017-11-25 15:24:52 +01:00
|
|
|
license = licenses.asl20;
|
2019-03-24 00:55:09 +01:00
|
|
|
maintainers = with maintainers; [ thpham vdemeester ];
|
2017-11-25 15:24:52 +01:00
|
|
|
};
|
|
|
|
}
|