diff options
author | Mario Rodas <marsam@users.noreply.github.com> | 2020-09-07 04:20:00 +0000 |
---|---|---|
committer | Mario Rodas <marsam@users.noreply.github.com> | 2020-09-07 04:20:00 +0000 |
commit | d1b9bc601980e5a92124d168db587f14719506da (patch) | |
tree | 04dc8d2dcd97f083c91363510220f780e28769ba /pkgs/development/tools/the-way | |
parent | 1cb7ba32623e4b9de730dfebac546b3573af25a5 (diff) |
the-way: install completions
Diffstat (limited to 'pkgs/development/tools/the-way')
-rw-r--r-- | pkgs/development/tools/the-way/default.nix | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/pkgs/development/tools/the-way/default.nix b/pkgs/development/tools/the-way/default.nix index 24418a42d4205..dce18580577c9 100644 --- a/pkgs/development/tools/the-way/default.nix +++ b/pkgs/development/tools/the-way/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, rustPlatform, AppKit, Security }: +{ stdenv, fetchFromGitHub, rustPlatform, installShellFiles, AppKit, Security }: rustPlatform.buildRustPackage rec { pname = "the-way"; @@ -11,12 +11,22 @@ rustPlatform.buildRustPackage rec { sha256 = "1whmvzpqm8x1q45mzrp4p40nj251drcryj9z4qjxgjlfsd5d1fxq"; }; + nativeBuildInputs = [ installShellFiles ]; + buildInputs = stdenv.lib.optionals stdenv.isDarwin [ AppKit Security ]; cargoSha256 = "0adhgp6blwx7s1hlwqzzsgkzc43q9avxx8a9ykvvv2s1w7m9ql78"; #checkFlags = "--test-threads=1"; doCheck = false; + postInstall = '' + $out/bin/the-way config default tmp.toml + for shell in bash fish zsh; do + THE_WAY_CONFIG=tmp.toml $out/bin/the-way complete $shell > the-way.$shell + installShellCompletion the-way.$shell + done + ''; + meta = with stdenv.lib; { description = "Terminal code snippets manager"; homepage = "https://github.com/out-of-cheese-error/the-way"; |