summary refs log tree commit diff
path: root/pkgs/tools/security/rage
diff options
context:
space:
mode:
authorMario Rodas <marsam@users.noreply.github.com>2020-06-15 04:20:00 -0500
committerMario Rodas <marsam@users.noreply.github.com>2020-06-15 04:20:00 -0500
commitf49eb2cc3579458f707a784999dd0c8f189a083a (patch)
tree4dd4ce7f334b9b1be088460c6b8e7048e2bf9710 /pkgs/tools/security/rage
parent4d975b12c0dd3784af2dc1df6031e994d0295796 (diff)
downloadnixpkgs-f49eb2cc3579458f707a784999dd0c8f189a083a.tar
nixpkgs-f49eb2cc3579458f707a784999dd0c8f189a083a.tar.gz
nixpkgs-f49eb2cc3579458f707a784999dd0c8f189a083a.tar.bz2
nixpkgs-f49eb2cc3579458f707a784999dd0c8f189a083a.tar.lz
nixpkgs-f49eb2cc3579458f707a784999dd0c8f189a083a.tar.xz
nixpkgs-f49eb2cc3579458f707a784999dd0c8f189a083a.tar.zst
nixpkgs-f49eb2cc3579458f707a784999dd0c8f189a083a.zip
rage: install manpages and completions
Diffstat (limited to 'pkgs/tools/security/rage')
-rw-r--r--pkgs/tools/security/rage/default.nix14
1 files changed, 13 insertions, 1 deletions
diff --git a/pkgs/tools/security/rage/default.nix b/pkgs/tools/security/rage/default.nix
index cdba2f2beb0..26ae27dff6b 100644
--- a/pkgs/tools/security/rage/default.nix
+++ b/pkgs/tools/security/rage/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, rustPlatform, fetchFromGitHub, Security }:
+{ stdenv, rustPlatform, fetchFromGitHub, installShellFiles, Security }:
 
 rustPlatform.buildRustPackage rec {
   pname = "rage";
@@ -13,8 +13,20 @@ rustPlatform.buildRustPackage rec {
 
   cargoSha256 = "08njl8irkqkfxj54pz4sx3l9aqb40h10wxb82zza52pqd4zapgn6";
 
+  nativeBuildInputs = [ installShellFiles ];
+
   buildInputs = stdenv.lib.optionals stdenv.isDarwin [ Security ];
 
+  postBuild = ''
+    cargo run --example generate-docs
+    cargo run --example generate-completions
+  '';
+
+  postInstall = ''
+    installManPage target/manpages/*
+    installShellCompletion target/completions/*.{bash,fish,zsh}
+  '';
+
   meta = with stdenv.lib; {
     description = "A simple, secure and modern encryption tool with small explicit keys, no config options, and UNIX-style composability";
     homepage = "https://github.com/str4d/rage";