mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-15 06:14:57 +01:00
55 lines
1.2 KiB
Nix
55 lines
1.2 KiB
Nix
{
|
|
lib,
|
|
fetchFromGitHub,
|
|
testers,
|
|
nix-update-script,
|
|
phraze,
|
|
rustPlatform,
|
|
installShellFiles,
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "phraze";
|
|
version = "0.3.14";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "sts10";
|
|
repo = "phraze";
|
|
rev = "v${version}";
|
|
hash = "sha256-wfvnzKoxFgIizbPrt8v9na6n/qjnjS368P1iOEh5VNw=";
|
|
};
|
|
|
|
doCheck = true;
|
|
|
|
cargoHash = "sha256-HEsXGlNpr/1NiJobjtwftI8HIfz0AnRtxMvh3Pf2gDo=";
|
|
|
|
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
|
|
'';
|
|
|
|
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;
|
|
maintainers = with lib.maintainers; [
|
|
x123
|
|
donovanglover
|
|
];
|
|
mainProgram = "phraze";
|
|
};
|
|
}
|