-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
/
package.nix
48 lines (42 loc) · 1.08 KB
/
package.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
{
lib,
fetchFromGitHub,
buildGoModule,
installShellFiles,
}:
buildGoModule rec {
pname = "uplosi";
version = "0.2.1";
src = fetchFromGitHub {
owner = "edgelesssys";
repo = pname;
rev = "v${version}";
hash = "sha256-i/RVCoeQLeOaPaEtJS/l+42CVohMucA6cBBt0mdJ4uE=";
};
vendorHash = "sha256-f8Yz99qlN0S0Ybewifc0VQanYXKinb1togBkUwDPSvw=";
CGO_ENABLED = "0";
ldflags = [
"-s"
"-w"
"-X main.version=${version}"
];
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;
};
}