1{ lib
2, buildGoModule
3, fetchFromGitHub
4}:
5
6buildGoModule rec {
7 pname = "step-cli";
8 version = "0.23.0";
9
10 src = fetchFromGitHub {
11 owner = "smallstep";
12 repo = "cli";
13 rev = "v${version}";
14 sha256 = "sha256-GNFzP/qs8tRfp1IEa0Th/nVi31YKQWT77HJHJNEUzoQ=";
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 vendorSha256 = "sha256-vDdc5lT2/4BFz8gbF9o8ld09b6p7LuqcKrA5ypTkpgc=";
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 license = licenses.asl20;
34 maintainers = with maintainers; [ xfix ];
35 platforms = platforms.linux ++ platforms.darwin;
36 mainProgram = "step";
37 };
38}