2024-09-19 14:19:46 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
fetchFromGitHub,
|
|
|
|
buildGoModule,
|
|
|
|
installShellFiles,
|
|
|
|
nix-update-script,
|
2023-10-19 13:55:26 +00:00
|
|
|
}:
|
2024-09-19 14:19:46 +00:00
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
buildGoModule rec {
|
2023-10-19 13:55:26 +00:00
|
|
|
pname = "uplosi";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "0.3.0";
|
2023-10-19 13:55:26 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "edgelesssys";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2024-09-19 14:19:46 +00:00
|
|
|
hash = "sha256-AtsFZ92WkVkH8fd0Xa0D6/PR84/dtOH6gpM4mtn32Hk=";
|
2023-10-19 13:55:26 +00:00
|
|
|
};
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
vendorHash = "sha256-o7PPgW3JL47G6Na5n9h3RasRMfU25FD1U/wCMaydRmc=";
|
2023-10-19 13:55:26 +00:00
|
|
|
|
|
|
|
CGO_ENABLED = "0";
|
2024-09-19 14:19:46 +00:00
|
|
|
ldflags = [
|
|
|
|
"-s"
|
|
|
|
"-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)
|
|
|
|
'';
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
passthru.updateScript = nix-update-script { };
|
|
|
|
|
|
|
|
meta = {
|
2023-10-19 13:55:26 +00:00
|
|
|
description = "Upload OS images to cloud provider";
|
|
|
|
homepage = "https://github.com/edgelesssys/uplosi";
|
|
|
|
changelog = "https://github.com/edgelesssys/uplosi/releases/tag/v${version}";
|
2024-09-19 14:19:46 +00:00
|
|
|
license = lib.licenses.asl20;
|
2023-10-19 13:55:26 +00:00
|
|
|
mainProgram = "uplosi";
|
2024-09-19 14:19:46 +00:00
|
|
|
maintainers = with lib.maintainers; [
|
|
|
|
katexochen
|
|
|
|
malt3
|
|
|
|
];
|
|
|
|
platforms = lib.platforms.unix;
|
2023-10-19 13:55:26 +00:00
|
|
|
};
|
|
|
|
}
|