about summary refs log tree commit diff
path: root/pkgs/by-name/ph/phraze/package.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/by-name/ph/phraze/package.nix')
-rw-r--r--pkgs/by-name/ph/phraze/package.nix33
1 files changed, 29 insertions, 4 deletions
diff --git a/pkgs/by-name/ph/phraze/package.nix b/pkgs/by-name/ph/phraze/package.nix
index fe9376e9d632c..8f5664d5c2a5d 100644
--- a/pkgs/by-name/ph/phraze/package.nix
+++ b/pkgs/by-name/ph/phraze/package.nix
@@ -1,30 +1,55 @@
 {
   lib,
   fetchFromGitHub,
+  testers,
+  nix-update-script,
+  phraze,
   rustPlatform,
+  installShellFiles,
 }:
 
 rustPlatform.buildRustPackage rec {
   pname = "phraze";
-  version = "0.3.11";
+  version = "0.3.14";
 
   src = fetchFromGitHub {
     owner = "sts10";
     repo = "phraze";
     rev = "v${version}";
-    hash = "sha256-1tvFVwTvtjAXVfCObdL3tGq50q4zouchNAuMo7euZ3g=";
+    hash = "sha256-wfvnzKoxFgIizbPrt8v9na6n/qjnjS368P1iOEh5VNw=";
   };
 
   doCheck = true;
 
-  cargoHash = "sha256-q3nkNBEiisGp+ElSXZnT4x6P0Sm5sM2R9cpzpaJ/UU4=";
+  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 ];
+    maintainers = with lib.maintainers; [
+      x123
+      donovanglover
+    ];
     mainProgram = "phraze";
   };
 }