nixpkgs/pkgs/applications/networking/cluster/kompose/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

42 lines
1.0 KiB
Nix
Raw Normal View History

2022-04-04 14:35:00 +00:00
{ lib, buildGoModule, fetchFromGitHub, installShellFiles, testVersion, kompose }:
2017-11-25 14:24:52 +00:00
2022-04-04 14:35:00 +00:00
buildGoModule rec {
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-04-04 14:35:00 +00:00
vendorSha256 = "sha256-OR5U2PnebO0a+lwU09Dveh0Yxk91cmSRorTxQIO5lHc=";
nativeBuildInputs = [ installShellFiles ];
2022-04-04 14:35:00 +00:00
ldflags = [ "-s" "-w" ];
checkFlags = [ "-short" ];
postInstall = ''
2020-04-26 03:16:51 +00:00
for shell in bash zsh; do
$out/bin/kompose completion $shell > kompose.$shell
2020-04-26 03:16:51 +00:00
installShellCompletion kompose.$shell
done
'';
2022-04-04 14:35:00 +00:00
passthru.tests.version = testVersion {
package = kompose;
command = "kompose version";
};
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";
homepage = "https://kompose.io";
2017-11-25 14:24:52 +00:00
license = licenses.asl20;
maintainers = with maintainers; [ thpham vdemeester ];
2017-11-25 14:24:52 +00:00
platforms = platforms.unix;
};
}