mirror of
https://codeberg.org/muon/home.git
synced 2026-03-08 19:43:12 +00:00
Add musk
This commit is contained in:
parent
ece28c8164
commit
4dcef2c6c6
7 changed files with 346 additions and 0 deletions
54
hosts/musk/packages/mender-cli.nix
Normal file
54
hosts/musk/packages/mender-cli.nix
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
{
|
||||
lib,
|
||||
stdenv,
|
||||
buildGoModule,
|
||||
fetchFromGitHub,
|
||||
makeWrapper,
|
||||
installShellFiles,
|
||||
xz,
|
||||
go,
|
||||
}:
|
||||
buildGoModule rec {
|
||||
pname = "mender-cli";
|
||||
version = "1.12.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "mendersoftware";
|
||||
repo = "mender-cli";
|
||||
rev = version;
|
||||
sha256 = "sha256-Pf87wTHXcFlnYsgx7ieiIJ9PWJFPUkFJYTkKJKmMFEQ=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-MqyBa+wsbuXqtM4DL/QGBUWuEYlG8BRxIXq7O1LJUyM=";
|
||||
|
||||
nativeBuildInputs = [
|
||||
makeWrapper
|
||||
installShellFiles
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
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/${version}";
|
||||
license = lib.licenses.asl20;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue