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 04:50:55 -04:00
{
lib,
fetchFromGitHub,
testers,
nix-update-script,
phraze,
2024-07-01 04:50:55 -04:00
rustPlatform,
installShellFiles,
2024-07-01 04:50:55 -04:00
}:
rustPlatform.buildRustPackage rec {
pname = "phraze";
2024-09-28 04:15:35 -04:00
version = "0.3.15";
2024-07-01 04:50:55 -04:00
src = fetchFromGitHub {
owner = "sts10";
repo = "phraze";
rev = "v${version}";
2024-09-28 04:15:35 -04:00
hash = "sha256-gpdXgR7TK3xJHHXcZdfMZApA3SvtNmCroi/5ChfrQOs=";
2024-07-01 04:50:55 -04:00
};
doCheck = true;
2024-09-28 04:15:35 -04:00
cargoHash = "sha256-tYQ/kcwCNAcgEUmwrrdogLd1AugBnVfqaLX9fjjpOUE=";
2024-07-01 04:50:55 -04: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 04:50:55 -04: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 15:04:03 -04:00
maintainers = with lib.maintainers; [
x123
donovanglover
];
2024-07-01 04:50:55 -04:00
mainProgram = "phraze";
};
}