2024-10-09 16:51:18 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildGoModule,
|
|
|
|
fetchFromGitHub,
|
|
|
|
installShellFiles,
|
|
|
|
nix-update-script,
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "sops";
|
2024-10-04 16:56:33 +00:00
|
|
|
version = "3.9.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2023-10-09 19:29:22 +00:00
|
|
|
owner = "getsops";
|
2020-04-24 23:36:52 +00:00
|
|
|
repo = pname;
|
2023-10-09 19:29:22 +00:00
|
|
|
rev = "v${version}";
|
2024-10-04 16:56:33 +00:00
|
|
|
hash = "sha256-j16hSTi7fwlMu8hwHqCR0lW22VSf0swIVTF81iUYl2k=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-10-04 16:56:33 +00:00
|
|
|
vendorHash = "sha256-40YESkLSKL/zFBI7ccz0ilrl9ATr74YpvRNrOpzJDew=";
|
2022-05-18 14:49:53 +00:00
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
subPackages = [ "cmd/sops" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
ldflags = [ "-s" "-w" "-X github.com/getsops/sops/v3/version.Version=${version}" ];
|
2020-08-20 17:08:02 +00:00
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
passthru.updateScript = nix-update-script { };
|
|
|
|
|
2024-10-09 16:51:18 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
installShellCompletion --cmd sops --bash ${./bash_autocomplete}
|
|
|
|
installShellCompletion --cmd sops --zsh ${./zsh_autocomplete}
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2024-07-27 06:49:29 +00:00
|
|
|
homepage = "https://getsops.io/";
|
2023-10-09 19:29:22 +00:00
|
|
|
description = "Simple and flexible tool for managing secrets";
|
|
|
|
changelog = "https://github.com/getsops/sops/blob/v${version}/CHANGELOG.rst";
|
2023-11-16 04:20:00 +00:00
|
|
|
mainProgram = "sops";
|
2024-05-15 15:35:15 +00:00
|
|
|
maintainers = with maintainers; [ Scrumplex mic92 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mpl20;
|
|
|
|
};
|
2020-08-20 17:08:02 +00:00
|
|
|
}
|