2023-10-19 13:55:26 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
2024-01-25 14:12:00 +00:00
|
|
|
, buildGoModule
|
2024-02-07 01:22:34 +00:00
|
|
|
, installShellFiles
|
2023-10-19 13:55:26 +00:00
|
|
|
}:
|
2024-01-25 14:12:00 +00:00
|
|
|
buildGoModule rec {
|
2023-10-19 13:55:26 +00:00
|
|
|
pname = "uplosi";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "0.2.0";
|
2023-10-19 13:55:26 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "edgelesssys";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-TrHREV/bmrjwlE4bsXZDKvIQKa68AnUSktnqCKdvOe8=";
|
2023-10-19 13:55:26 +00:00
|
|
|
};
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
vendorHash = "sha256-0uQBhNRP3OGn3hw6Mx6tRliTqIhoBnyfRmdtdtuYwaY=";
|
2023-10-19 13:55:26 +00:00
|
|
|
|
|
|
|
CGO_ENABLED = "0";
|
2024-01-25 14:12:00 +00:00
|
|
|
ldflags = [ "-s" "-w" "-X main.version=${version}" ];
|
2023-10-19 13:55:26 +00:00
|
|
|
|
2024-02-07 01:22:34 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
installShellCompletion --cmd uplosi \
|
|
|
|
--bash <($out/bin/uplosi completion bash) \
|
|
|
|
--fish <($out/bin/uplosi completion fish) \
|
|
|
|
--zsh <($out/bin/uplosi completion zsh)
|
|
|
|
'';
|
|
|
|
|
2023-10-19 13:55:26 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Upload OS images to cloud provider";
|
|
|
|
homepage = "https://github.com/edgelesssys/uplosi";
|
|
|
|
changelog = "https://github.com/edgelesssys/uplosi/releases/tag/v${version}";
|
|
|
|
license = licenses.asl20;
|
|
|
|
mainProgram = "uplosi";
|
|
|
|
maintainers = with maintainers; [ katexochen malt3 ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|