mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 07:53:19 +00:00
Merge pull request #281139 from katexochen/uplosi/0-1-3
uplosi: 0.1.2 -> 0.1.3, add shell completion
This commit is contained in:
commit
d64c123c6d
@ -1,24 +1,34 @@
|
||||
{ lib
|
||||
, fetchFromGitHub
|
||||
, buildGoModule
|
||||
, installShellFiles
|
||||
}:
|
||||
buildGoModule rec {
|
||||
pname = "uplosi";
|
||||
version = "0.1.2";
|
||||
version = "0.1.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "edgelesssys";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
hash = "sha256-9hOeKnjH6r3CPQSe6fQ6PXlVPEJ9NiyXvp5N1krG2XA=";
|
||||
hash = "sha256-RqjaI/1Sx36JfpvnLblt8hPfgSral3Gvp8M6BshKVwo=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-RsjUPLe8omoN+XGyNhHDxzNfZR7VVTkh/f/On1oCRqM=";
|
||||
vendorHash = "sha256-eZ0/piSxMUC1ZM7qBhFW40l9p8ZPMIj1HyrS2Dy4wJQ=";
|
||||
|
||||
CGO_ENABLED = "0";
|
||||
ldflags = [ "-s" "-w" "-X main.version=${version}" ];
|
||||
flags = [ "-trimpath" ];
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
postInstall = ''
|
||||
installShellCompletion --cmd uplosi \
|
||||
--bash <($out/bin/uplosi completion bash) \
|
||||
--fish <($out/bin/uplosi completion fish) \
|
||||
--zsh <($out/bin/uplosi completion zsh)
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Upload OS images to cloud provider";
|
||||
homepage = "https://github.com/edgelesssys/uplosi";
|
||||
|
Loading…
Reference in New Issue
Block a user