2022-09-05 00:10:23 +00:00
|
|
|
{ buildGoModule
|
|
|
|
, doppler
|
|
|
|
, fetchFromGitHub
|
|
|
|
, installShellFiles
|
|
|
|
, lib
|
|
|
|
, testers
|
|
|
|
}:
|
2020-08-06 23:36:01 +00:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "doppler";
|
2022-10-13 07:23:03 +00:00
|
|
|
version = "3.45.0";
|
2020-08-06 23:36:01 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "dopplerhq";
|
|
|
|
repo = "cli";
|
|
|
|
rev = version;
|
2022-10-13 07:23:03 +00:00
|
|
|
sha256 = "sha256-kQio3l50gjPfywUpeTEt4Xon1p07XpgStNSmICPboXQ=";
|
2020-08-06 23:36:01 +00:00
|
|
|
};
|
|
|
|
|
2022-07-26 16:53:24 +00:00
|
|
|
vendorSha256 = "sha256-evG1M0ZHfn9hsMsSncwxF5Hr/VJ7y6Ir0D2gHJaunBo=";
|
2020-08-06 23:36:01 +00:00
|
|
|
|
2022-09-05 00:10:23 +00:00
|
|
|
ldflags = [
|
|
|
|
"-s -w"
|
|
|
|
"-X github.com/DopplerHQ/cli/pkg/version.ProgramVersion=v${version}"
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
2020-08-06 23:36:01 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mv $out/bin/cli $out/bin/doppler
|
2022-09-05 00:10:23 +00:00
|
|
|
installShellCompletion --cmd doppler \
|
|
|
|
--bash <($out/bin/doppler completion bash) \
|
|
|
|
--fish <($out/bin/doppler completion fish) \
|
|
|
|
--zsh <($out/bin/doppler completion zsh)
|
2020-08-06 23:36:01 +00:00
|
|
|
'';
|
|
|
|
|
2022-09-05 00:10:23 +00:00
|
|
|
passthru.tests.version = testers.testVersion {
|
|
|
|
package = doppler;
|
|
|
|
version = "v${version}";
|
|
|
|
};
|
|
|
|
|
2020-08-06 23:36:01 +00:00
|
|
|
meta = with lib; {
|
2022-08-31 18:55:31 +00:00
|
|
|
description = "The official CLI for interacting with your Doppler Enclave secrets and configuration";
|
2022-09-05 00:10:23 +00:00
|
|
|
homepage = "https://doppler.com";
|
2020-08-06 23:36:01 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ lucperkins ];
|
|
|
|
};
|
|
|
|
}
|