nixpkgs/pkgs/by-name/ph/phraze/package.nix

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

56 lines
1.2 KiB
Nix
Raw Normal View History

2024-07-01 08:50:55 +00:00
{
lib,
fetchFromGitHub,
testers,
nix-update-script,
phraze,
2024-07-01 08:50:55 +00:00
rustPlatform,
installShellFiles,
2024-07-01 08:50:55 +00:00
}:
rustPlatform.buildRustPackage rec {
pname = "phraze";
2024-11-28 06:35:29 +00:00
version = "0.3.17";
2024-07-01 08:50:55 +00:00
src = fetchFromGitHub {
owner = "sts10";
repo = "phraze";
rev = "v${version}";
2024-11-28 06:35:29 +00:00
hash = "sha256-r+d2npf9qtAiAuqDhw0sZm6aIcGdsppWXLEJctZsyEg=";
2024-07-01 08:50:55 +00:00
};
doCheck = true;
2024-11-28 06:35:29 +00:00
cargoHash = "sha256-OFD3wSKQ3BCQfTCy5fjVxRJufvTVO97qLhKq6jwatfQ=";
2024-07-01 08:50:55 +00:00
nativeBuildInputs = [ installShellFiles ];
passthru = {
updateScript = nix-update-script { };
tests = {
version = testers.testVersion { package = phraze; };
};
};
postInstall = ''
installManPage target/man/phraze.1
installShellCompletion --cmd phraze \
--bash target/completions/phraze.bash \
--fish target/completions/phraze.fish \
--zsh target/completions/_phraze
'';
2024-07-01 08:50:55 +00:00
meta = {
description = "Generate random passphrases";
homepage = "https://github.com/sts10/phraze";
changelog = "https://github.com/sts10/phraze/releases/tag/v${version}";
license = lib.licenses.mpl20;
2024-07-30 19:04:03 +00:00
maintainers = with lib.maintainers; [
x123
donovanglover
];
2024-07-01 08:50:55 +00:00
mainProgram = "phraze";
};
}