blob: 6024975021e552dfb22e71efbd2176c2b3d66488 (
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
{ lib
, stdenv
, buildGoModule
, fetchFromGitHub
, installShellFiles
, btrfs-progs
, glibc
, testers
, werf
}:
buildGoModule rec {
pname = "werf";
version = "1.2.166";
src = fetchFromGitHub {
owner = "werf";
repo = "werf";
rev = "v${version}";
sha256 = "sha256-8LBGdjcnZTejH+lRo0im+czJJHOfhpmEB4DXM/qugYs=";
};
vendorSha256 = "sha256-E5yDk48O7zze8QTeLQ999QmB8XLkpKNZ8JQ2wVRMGCU=";
proxyVendor = true;
subPackages = [ "cmd/werf" ];
nativeBuildInputs = [ installShellFiles ];
buildInputs = lib.optionals stdenv.isLinux [ btrfs-progs glibc.static ];
ldflags = [
"-s"
"-w"
"-X github.com/werf/werf/pkg/werf.Version=${src.rev}"
] ++ lib.optionals stdenv.isLinux [
"-extldflags=-static"
"-linkmode external"
];
tags = [
"containers_image_openpgp"
"dfrunmount"
"dfssh"
] ++ lib.optionals stdenv.isLinux [
"exclude_graphdriver_devicemapper"
"netgo"
"no_devmapper"
"osusergo"
"static_build"
];
# There are no tests for cmd/werf.
doCheck = false;
postInstall = ''
installShellCompletion --cmd werf \
--bash <($out/bin/werf completion --shell=bash) \
--zsh <($out/bin/werf completion --shell=zsh)
'';
passthru.tests.version = testers.testVersion {
package = werf;
command = "werf version";
version = "v${version}";
};
meta = with lib; {
description = "GitOps delivery tool";
longDescription = ''
The CLI tool gluing Git, Docker, Helm & Kubernetes with any CI system to
implement CI/CD and Giterminism.
'';
homepage = "https://werf.io";
changelog = "https://github.com/werf/werf/releases/tag/${src.rev}";
license = licenses.asl20;
maintainers = with maintainers; [ azahi ];
};
}
|