mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-29 09:04:17 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
52 lines
1.2 KiB
Nix
52 lines
1.2 KiB
Nix
{ lib
|
|
, buildGoModule
|
|
, fetchFromGitHub
|
|
, installShellFiles
|
|
, kubeone
|
|
, testers
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "kubeone";
|
|
version = "1.8.3";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "kubermatic";
|
|
repo = "kubeone";
|
|
rev = "v${version}";
|
|
hash = "sha256-+9Dw6W/Tbg7zRC/ARuuXqZGTcMeSrtdoTvHtsQevigg=";
|
|
};
|
|
|
|
vendorHash = "sha256-z1BBE+PH2s7VxWNxneu5y2ZerfzCZNPJowZJVq821Kk=";
|
|
|
|
ldflags = [
|
|
"-s"
|
|
"-w"
|
|
"-X k8c.io/kubeone/pkg/cmd.version=${version}"
|
|
"-X k8c.io/kubeone/pkg/cmd.date=unknown"
|
|
];
|
|
|
|
nativeBuildInputs = [
|
|
installShellFiles
|
|
];
|
|
|
|
postInstall = ''
|
|
installShellCompletion --cmd kubeone \
|
|
--bash <($out/bin/kubeone completion bash) \
|
|
--zsh <($out/bin/kubeone completion zsh)
|
|
'';
|
|
|
|
passthru.tests.version = testers.testVersion {
|
|
package = kubeone;
|
|
command = "kubeone version";
|
|
};
|
|
|
|
meta = with lib; {
|
|
description = "Automate cluster operations on all your cloud, on-prem, edge, and IoT environments";
|
|
homepage = "https://kubeone.io/";
|
|
changelog = "https://github.com/kubermatic/kubeone/releases/tag/v${version}";
|
|
license = licenses.asl20;
|
|
maintainers = with maintainers; [ lblasc ];
|
|
};
|
|
}
|