mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-03 12:23:02 +00:00
49 lines
1.1 KiB
Nix
49 lines
1.1 KiB
Nix
{ buildGoModule
|
|
, doppler
|
|
, fetchFromGitHub
|
|
, installShellFiles
|
|
, lib
|
|
, testers
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "doppler";
|
|
version = "3.52.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "dopplerhq";
|
|
repo = "cli";
|
|
rev = version;
|
|
sha256 = "sha256-ppgFUO5WxraG83zX8tHahT/ixSJjrTmmiIrJPpbkZVs=";
|
|
};
|
|
|
|
vendorSha256 = "sha256-TwcEH+LD0E/JcptMCYb3UycO3HhZX3igzSlBW4hS784=";
|
|
|
|
ldflags = [
|
|
"-s -w"
|
|
"-X github.com/DopplerHQ/cli/pkg/version.ProgramVersion=v${version}"
|
|
];
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
postInstall = ''
|
|
mv $out/bin/cli $out/bin/doppler
|
|
installShellCompletion --cmd doppler \
|
|
--bash <($out/bin/doppler completion bash) \
|
|
--fish <($out/bin/doppler completion fish) \
|
|
--zsh <($out/bin/doppler completion zsh)
|
|
'';
|
|
|
|
passthru.tests.version = testers.testVersion {
|
|
package = doppler;
|
|
version = "v${version}";
|
|
};
|
|
|
|
meta = with lib; {
|
|
description = "The official CLI for interacting with your Doppler Enclave secrets and configuration";
|
|
homepage = "https://doppler.com";
|
|
license = licenses.asl20;
|
|
maintainers = with maintainers; [ lucperkins ];
|
|
};
|
|
}
|