1{ lib
2, buildGoModule
3, fetchFromGitHub
4}:
5
6buildGoModule rec {
7 pname = "step-cli";
8 version = "0.24.4";
9
10 src = fetchFromGitHub {
11 owner = "smallstep";
12 repo = "cli";
13 rev = "refs/tags/v${version}";
14 hash = "sha256-QSV1+EKaz0anV+Kj5sUEJgVEZkSi4cQG5GiWsgGKN/I=";
15 };
16
17 ldflags = [
18 "-w"
19 "-s"
20 "-X main.Version=${version}"
21 ];
22
23 preCheck = ''
24 # Tries to connect to smallstep.com
25 rm command/certificate/remote_test.go
26 '';
27
28 vendorHash = "sha256-R2lnbHTIfgKdgeZ21JLKlVuPIwvNmjXSlzb8bwrva2U=";
29
30 meta = with lib; {
31 description = "A zero trust swiss army knife for working with X509, OAuth, JWT, OATH OTP, etc";
32 homepage = "https://smallstep.com/cli/";
33 changelog = "https://github.com/smallstep/cli/blob/v${version}/CHANGELOG.md";
34 license = licenses.asl20;
35 maintainers = with maintainers; [ xfix ];
36 platforms = platforms.linux ++ platforms.darwin;
37 mainProgram = "step";
38 };
39}