nixpkgs/pkgs/tools/security/doppler/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

49 lines
1.1 KiB
Nix
Raw Normal View History

{ buildGoModule
, doppler
, fetchFromGitHub
, installShellFiles
, lib
, testers
}:
2020-08-06 23:36:01 +00:00
buildGoModule rec {
pname = "doppler";
2023-05-20 18:49:09 +00:00
version = "3.60.1";
2020-08-06 23:36:01 +00:00
src = fetchFromGitHub {
owner = "dopplerhq";
repo = "cli";
rev = version;
2023-05-20 18:49:09 +00:00
sha256 = "sha256-WzR2oKBQ3GEEmOC0hhb6tcVR4GfapS0LzLCJosQo37k=";
2020-08-06 23:36:01 +00:00
};
2023-05-06 10:35:16 +00:00
vendorHash = "sha256-yuGjaUHfXCJnMvxfaSwbVAApflwfsvX2W7iEZdruMDE=";
2020-08-06 23:36:01 +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
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
'';
passthru.tests.version = testers.testVersion {
package = doppler;
version = "v${version}";
};
2020-08-06 23:36:01 +00:00
meta = with lib; {
description = "The official CLI for interacting with your Doppler Enclave secrets and configuration";
homepage = "https://doppler.com";
2020-08-06 23:36:01 +00:00
license = licenses.asl20;
maintainers = with maintainers; [ lucperkins ];
};
}