571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
44 lines
1.1 KiB
Nix
44 lines
1.1 KiB
Nix
{
|
|
lib,
|
|
buildGoModule,
|
|
fetchFromGitHub,
|
|
installShellFiles,
|
|
nix-update-script,
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "sops";
|
|
version = "3.9.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "getsops";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
hash = "sha256-j16hSTi7fwlMu8hwHqCR0lW22VSf0swIVTF81iUYl2k=";
|
|
};
|
|
|
|
vendorHash = "sha256-40YESkLSKL/zFBI7ccz0ilrl9ATr74YpvRNrOpzJDew=";
|
|
|
|
subPackages = [ "cmd/sops" ];
|
|
|
|
ldflags = [ "-s" "-w" "-X github.com/getsops/sops/v3/version.Version=${version}" ];
|
|
|
|
passthru.updateScript = nix-update-script { };
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
postInstall = ''
|
|
installShellCompletion --cmd sops --bash ${./bash_autocomplete}
|
|
installShellCompletion --cmd sops --zsh ${./zsh_autocomplete}
|
|
'';
|
|
|
|
meta = with lib; {
|
|
homepage = "https://getsops.io/";
|
|
description = "Simple and flexible tool for managing secrets";
|
|
changelog = "https://github.com/getsops/sops/blob/v${version}/CHANGELOG.rst";
|
|
mainProgram = "sops";
|
|
maintainers = with maintainers; [ Scrumplex mic92 ];
|
|
license = licenses.mpl20;
|
|
};
|
|
}
|