nixpkgs/pkgs/by-name/up/uplosi/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

41 lines
1.0 KiB
Nix
Raw Normal View History

{ lib
, fetchFromGitHub
2024-01-14 00:23:10 +00:00
, buildGoModule
2024-01-15 13:52:52 +00:00
, installShellFiles
}:
2024-01-14 00:23:10 +00:00
buildGoModule rec {
pname = "uplosi";
2024-04-30 09:29:55 +00:00
version = "0.2.1";
src = fetchFromGitHub {
owner = "edgelesssys";
repo = pname;
rev = "v${version}";
2024-04-30 09:29:55 +00:00
hash = "sha256-i/RVCoeQLeOaPaEtJS/l+42CVohMucA6cBBt0mdJ4uE=";
};
2024-04-30 09:29:55 +00:00
vendorHash = "sha256-f8Yz99qlN0S0Ybewifc0VQanYXKinb1togBkUwDPSvw=";
CGO_ENABLED = "0";
ldflags = [ "-s" "-w" "-X main.version=${version}" ];
2024-01-15 13:52:52 +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)
'';
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;
};
}