1{ buildGoModule
2, doppler
3, fetchFromGitHub
4, installShellFiles
5, lib
6, testers
7}:
8
9buildGoModule rec {
10 pname = "doppler";
11 version = "3.60.1";
12
13 src = fetchFromGitHub {
14 owner = "dopplerhq";
15 repo = "cli";
16 rev = version;
17 sha256 = "sha256-WzR2oKBQ3GEEmOC0hhb6tcVR4GfapS0LzLCJosQo37k=";
18 };
19
20 vendorHash = "sha256-yuGjaUHfXCJnMvxfaSwbVAApflwfsvX2W7iEZdruMDE=";
21
22 ldflags = [
23 "-s -w"
24 "-X github.com/DopplerHQ/cli/pkg/version.ProgramVersion=v${version}"
25 ];
26
27 nativeBuildInputs = [ installShellFiles ];
28
29 postInstall = ''
30 mv $out/bin/cli $out/bin/doppler
31 installShellCompletion --cmd doppler \
32 --bash <($out/bin/doppler completion bash) \
33 --fish <($out/bin/doppler completion fish) \
34 --zsh <($out/bin/doppler completion zsh)
35 '';
36
37 passthru.tests.version = testers.testVersion {
38 package = doppler;
39 version = "v${version}";
40 };
41
42 meta = with lib; {
43 description = "The official CLI for interacting with your Doppler Enclave secrets and configuration";
44 homepage = "https://doppler.com";
45 license = licenses.asl20;
46 maintainers = with maintainers; [ lucperkins ];
47 };
48}