git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #90560 from marsam/rage-install-completions

rage: install manpages and completions

commitffce9f2c8e06a7aa5ea95c29386d9b822ab59862 authorMario Rodas <marsam@users.noreply.github.com> dateMon 15 Jun 2020, 21:09 (6 years ago) parent4d975b1f49eb2c
1 file changed+13−1
pkgs/tools/security/rage/default.nix+13−1
pkgs/tools/security/rage/default.nix+13−1
@@ -1,4 +1,4 @@
1−{ stdenv, rustPlatform, fetchFromGitHub, Security }:
1+{ stdenv, rustPlatform, fetchFromGitHub, installShellFiles, Security }:
22
33rustPlatform.buildRustPackage rec {
44 pname = "rage";
@@ -13,8 +13,20 @@ rustPlatform.buildRustPackage rec {
1313
1414 cargoSha256 = "08njl8irkqkfxj54pz4sx3l9aqb40h10wxb82zza52pqd4zapgn6";
1515
16+ nativeBuildInputs = [ installShellFiles ];
17+
1618 buildInputs = stdenv.lib.optionals stdenv.isDarwin [ Security ];
1719
20+ postBuild = ''
21+ cargo run --example generate-docs
22+ cargo run --example generate-completions
23+ '';
24+
25+ postInstall = ''
26+ installManPage target/manpages/*
27+ installShellCompletion target/completions/*.{bash,fish,zsh}
28+ '';
29+
1830 meta = with stdenv.lib; {
1931 description = "A simple, secure and modern encryption tool with small explicit keys, no config options, and UNIX-style composability";
2032 homepage = "https://github.com/str4d/rage";