2024-07-27 06:49:29 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
fetchFromGitHub,
|
|
|
|
testers,
|
|
|
|
nix-update-script,
|
|
|
|
phraze,
|
|
|
|
rustPlatform,
|
2024-09-19 14:19:46 +00:00
|
|
|
installShellFiles,
|
2024-07-27 06:49:29 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "phraze";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "0.3.14";
|
2024-07-27 06:49:29 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "sts10";
|
|
|
|
repo = "phraze";
|
|
|
|
rev = "v${version}";
|
2024-09-19 14:19:46 +00:00
|
|
|
hash = "sha256-wfvnzKoxFgIizbPrt8v9na6n/qjnjS368P1iOEh5VNw=";
|
2024-07-27 06:49:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
cargoHash = "sha256-HEsXGlNpr/1NiJobjtwftI8HIfz0AnRtxMvh3Pf2gDo=";
|
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
2024-07-27 06:49:29 +00:00
|
|
|
|
|
|
|
passthru = {
|
|
|
|
updateScript = nix-update-script { };
|
|
|
|
tests = {
|
|
|
|
version = testers.testVersion { package = phraze; };
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
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-27 06:49:29 +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-09-19 14:19:46 +00:00
|
|
|
maintainers = with lib.maintainers; [
|
|
|
|
x123
|
|
|
|
donovanglover
|
|
|
|
];
|
2024-07-27 06:49:29 +00:00
|
|
|
mainProgram = "phraze";
|
|
|
|
};
|
|
|
|
}
|