2022-09-05 02:10:23 +02:00
|
|
|
{ buildGoModule
|
|
|
|
, doppler
|
|
|
|
, fetchFromGitHub
|
|
|
|
, installShellFiles
|
|
|
|
, lib
|
|
|
|
, testers
|
|
|
|
}:
|
2020-08-07 01:36:01 +02:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "doppler";
|
2023-11-29 17:32:37 +01:00
|
|
|
version = "3.66.5";
|
2020-08-07 01:36:01 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "dopplerhq";
|
|
|
|
repo = "cli";
|
|
|
|
rev = version;
|
2023-11-29 17:32:37 +01:00
|
|
|
sha256 = "sha256-/kcGfTDthm4gp1M4lSeY1x8Q7EWVX2pZVjF2rAbz+Es=";
|
2020-08-07 01:36:01 +02:00
|
|
|
};
|
|
|
|
|
2023-07-15 05:16:06 +02:00
|
|
|
vendorHash = "sha256-FOmaK6S61fkzybpDx6qfi6m4e2IaqBpavaFhEgIvmqw=";
|
2020-08-07 01:36:01 +02:00
|
|
|
|
2022-09-05 02:10:23 +02:00
|
|
|
ldflags = [
|
|
|
|
"-s -w"
|
|
|
|
"-X github.com/DopplerHQ/cli/pkg/version.ProgramVersion=v${version}"
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
2020-08-07 01:36:01 +02:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mv $out/bin/cli $out/bin/doppler
|
2022-09-05 02:10:23 +02:00
|
|
|
installShellCompletion --cmd doppler \
|
|
|
|
--bash <($out/bin/doppler completion bash) \
|
|
|
|
--fish <($out/bin/doppler completion fish) \
|
|
|
|
--zsh <($out/bin/doppler completion zsh)
|
2020-08-07 01:36:01 +02:00
|
|
|
'';
|
|
|
|
|
2022-09-05 02:10:23 +02:00
|
|
|
passthru.tests.version = testers.testVersion {
|
|
|
|
package = doppler;
|
|
|
|
version = "v${version}";
|
|
|
|
};
|
|
|
|
|
2020-08-07 01:36:01 +02:00
|
|
|
meta = with lib; {
|
2022-08-31 20:55:31 +02:00
|
|
|
description = "The official CLI for interacting with your Doppler Enclave secrets and configuration";
|
2022-09-05 02:10:23 +02:00
|
|
|
homepage = "https://doppler.com";
|
2020-08-07 01:36:01 +02:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ lucperkins ];
|
|
|
|
};
|
|
|
|
}
|