blob: 6f0022f127dc0ab2099db3d10c9fd93c5ea41186 (
plain) (
blame)
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
49
50
51
52
53
54
55
56
57
58
59
60
|
{ lib
, go
, buildGoModule
, fetchFromGitHub
, nix-update-script
, installShellFiles
}:
buildGoModule rec {
pname = "updatecli";
version = "0.75.0";
src = fetchFromGitHub {
owner = "updatecli";
repo = pname;
rev = "v${version}";
hash = "sha256-8jQCwnc/kj3m/02nrA/na422rrvxxF7D3LzUen3O6ms=";
};
vendorHash = "sha256-7LC5gzK54u8zEtDOyeU1kgIycGLxOeMWYrrDTvC3gVQ=";
# tests require network access
doCheck = false;
CGO_ENABLED = 0;
ldflags = [
"-s"
"-w"
"-X github.com/updatecli/updatecli/pkg/core/version.BuildTime=unknown"
''-X "github.com/updatecli/updatecli/pkg/core/version.GoVersion=go version go${lib.getVersion go}"''
"-X github.com/updatecli/updatecli/pkg/core/version.Version=${version}"
];
passthru.updateScript = nix-update-script { };
nativeBuildInputs = [ installShellFiles ];
postInstall = ''
installShellCompletion --cmd updatecli \
--bash <($out/bin/updatecli completion bash) \
--fish <($out/bin/updatecli completion fish) \
--zsh <($out/bin/updatecli completion zsh)
$out/bin/updatecli man > updatecli.1
installManPage updatecli.1
'';
meta = with lib; {
description = "A Declarative Dependency Management tool";
longDescription = ''
Updatecli is a command-line tool used to define and apply update strategies.
'';
homepage = "https://www.updatecli.io";
changelog = "https://github.com/updatecli/updatecli/releases/tag/v${version}";
license = licenses.asl20;
mainProgram = "updatecli";
maintainers = with maintainers; [ croissong ];
};
}
|