1 { lib, buildGoModule, fetchFromGitHub, installShellFiles, stdenv }:
7 src = fetchFromGitHub {
11 hash = "sha256-3UZD5zBSCFwq4lhiH8MAxFX4vtyGYh3h3Em+7w8id1k=";
13 vendorHash = "sha256-TuxYJ3u4/5PJYRoRgom+M1au9XerZ+vj9X3jUWTPM58=";
15 nativeBuildInputs = [ installShellFiles ];
20 "-X github.com/stripe/stripe-cli/pkg/version.Version=${version}"
24 # the tests expect the Version ldflag not to be set
27 # requires internet access
28 rm pkg/cmd/plugin_cmds_test.go
29 rm pkg/cmd/resources_test.go
30 rm pkg/cmd/root_test.go
32 # TODO: no clue why it's broken (1.17.1), remove for now.
33 rm pkg/login/client_login_test.go
34 rm pkg/git/editor_test.go
35 rm pkg/rpcservice/sample_create_test.go
36 '' + lib.optionalString (
37 # delete plugin tests on all platforms but exact matches
38 # https://github.com/stripe/stripe-cli/issues/850
40 (platform: lib.meta.platformMatch stdenv.hostPlatform platform)
41 [ "x86_64-linux" "x86_64-darwin" ]
43 rm pkg/plugins/plugin_test.go
47 installShellCompletion --cmd stripe \
48 --bash <($out/bin/stripe completion --write-to-stdout --shell bash) \
49 --zsh <($out/bin/stripe completion --write-to-stdout --shell zsh)
52 doInstallCheck = true;
53 installCheckPhase = ''
54 runHook preInstallCheck
55 $out/bin/stripe --help
56 $out/bin/stripe --version | grep "${version}"
57 runHook postInstallCheck
61 homepage = "https://stripe.com/docs/stripe-cli";
62 changelog = "https://github.com/stripe/stripe-cli/releases/tag/v${version}";
63 description = "Command-line tool for Stripe";
65 The Stripe CLI helps you build, test, and manage your Stripe integration
66 right from the terminal.
68 With the CLI, you can:
69 Securely test webhooks without relying on 3rd party software
70 Trigger webhook events or resend events for easy testing
71 Tail your API request logs in real-time
72 Create, retrieve, update, or delete API objects.
74 license = with licenses; [ asl20 ];
75 maintainers = with maintainers; [ RaghavSood jk kashw2 ];
76 mainProgram = "stripe";