mirror of
https://codeberg.org/muon/home.git
synced 2026-07-03 23:49:35 +00:00
51 lines
1.1 KiB
Nix
51 lines
1.1 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
buildGoModule,
|
|
sources,
|
|
makeWrapper,
|
|
installShellFiles,
|
|
pkg-config,
|
|
openssl,
|
|
xz,
|
|
go,
|
|
}:
|
|
let
|
|
src = sources.mender-cli;
|
|
in
|
|
buildGoModule {
|
|
inherit (src) pname version src vendorHash;
|
|
|
|
nativeBuildInputs = [
|
|
makeWrapper
|
|
installShellFiles
|
|
pkg-config
|
|
];
|
|
|
|
buildInputs = [
|
|
openssl
|
|
xz
|
|
];
|
|
|
|
allowGoReference = true;
|
|
|
|
postFixup = ''
|
|
wrapProgram "$out/bin/mender-cli" \
|
|
--prefix PATH : ${go}/bin
|
|
'';
|
|
|
|
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
|
installShellCompletion --cmd mender-cli \
|
|
--bash <($out/bin/mender-cli completion bash) \
|
|
--fish <($out/bin/mender-cli completion fish) \
|
|
--zsh <($out/bin/mender-cli completion zsh) \
|
|
'';
|
|
|
|
meta = {
|
|
description = "Mender CLI tool to simplify integration between the Mender server and cloud services like continuous integration (CI)/build automation";
|
|
mainProgram = "mender-cli";
|
|
homepage = "https://github.com/mendersoftware/mender-cli/";
|
|
changelog = "https://github.com/mendersoftware/mender-cli/releases/tag/${src.version}";
|
|
license = lib.licenses.asl20;
|
|
};
|
|
}
|