home-assistant: support lightify component (#379007)
[NixPkgs.git] / pkgs / by-name / up / uplosi / package.nix
blob14da37539a1f00174a01b5ccc8700993367ac068
2   lib,
3   fetchFromGitHub,
4   buildGoModule,
5   installShellFiles,
6   nix-update-script,
7 }:
9 buildGoModule rec {
10   pname = "uplosi";
11   version = "0.4.0";
13   src = fetchFromGitHub {
14     owner = "edgelesssys";
15     repo = pname;
16     rev = "v${version}";
17     hash = "sha256-5I916T70sH4UAq5EGRjR7lnRBbPqMJIxaXwUCJQ4DcM=";
18   };
20   vendorHash = "sha256-2lJmPNLpI1ksFb0EtcjPjyTy7eX1DKeX0F80k9FtGno=";
22   env.CGO_ENABLED = "0";
23   ldflags = [
24     "-s"
25     "-X main.version=${version}"
26   ];
28   nativeBuildInputs = [ installShellFiles ];
30   postInstall = ''
31     installShellCompletion --cmd uplosi \
32       --bash <($out/bin/uplosi completion bash) \
33       --fish <($out/bin/uplosi completion fish) \
34       --zsh <($out/bin/uplosi completion zsh)
35   '';
37   passthru.updateScript = nix-update-script { };
39   meta = {
40     description = "Upload OS images to cloud provider";
41     homepage = "https://github.com/edgelesssys/uplosi";
42     changelog = "https://github.com/edgelesssys/uplosi/releases/tag/v${version}";
43     license = lib.licenses.asl20;
44     mainProgram = "uplosi";
45     maintainers = with lib.maintainers; [
46       katexochen
47       malt3
48     ];
49     platforms = lib.platforms.unix;
50   };