summary refs log tree commit diff
path: root/pkgs/tools/misc/powerline-rs/default.nix
diff options
context:
space:
mode:
authorjD91mZM2 <me@krake.one>2018-05-06 13:17:32 +0200
committerjD91mZM2 <me@krake.one>2018-05-06 14:46:05 +0200
commit5fada46e88dca3ae889b29ffd4bf410d0e94b232 (patch)
tree0542b61c872f042893d99095e456eefbcd55812c /pkgs/tools/misc/powerline-rs/default.nix
parent4e906935ccb27ccdfcc2bc5af8bd2867dcbc679e (diff)
downloadnixpkgs-5fada46e88dca3ae889b29ffd4bf410d0e94b232.tar
nixpkgs-5fada46e88dca3ae889b29ffd4bf410d0e94b232.tar.gz
nixpkgs-5fada46e88dca3ae889b29ffd4bf410d0e94b232.tar.bz2
nixpkgs-5fada46e88dca3ae889b29ffd4bf410d0e94b232.tar.lz
nixpkgs-5fada46e88dca3ae889b29ffd4bf410d0e94b232.tar.xz
nixpkgs-5fada46e88dca3ae889b29ffd4bf410d0e94b232.tar.zst
nixpkgs-5fada46e88dca3ae889b29ffd4bf410d0e94b232.zip
powerline-rs: add bash & fish completion
Diffstat (limited to 'pkgs/tools/misc/powerline-rs/default.nix')
-rw-r--r--pkgs/tools/misc/powerline-rs/default.nix13
1 files changed, 9 insertions, 4 deletions
diff --git a/pkgs/tools/misc/powerline-rs/default.nix b/pkgs/tools/misc/powerline-rs/default.nix
index ff020d45101..e48816db935 100644
--- a/pkgs/tools/misc/powerline-rs/default.nix
+++ b/pkgs/tools/misc/powerline-rs/default.nix
@@ -1,6 +1,7 @@
-{ lib, rustPlatform, fetchFromGitHub, pkgconfig, file, perl, cmake, libgit2, openssl_1_1_0, libssh2, libzip }:
+{ lib, rustPlatform, fetchFromGitHub, pkgconfig, file, perl, cmake, openssl_1_1_0, libssh2, libgit2, libzip }:
 rustPlatform.buildRustPackage rec {
-  name = "powerline-rs-${version}";
+  pname = "powerline-rs";
+  name = "${pname}-${version}";
   version = "0.1.7";
 
   src = fetchFromGitHub {
@@ -14,8 +15,12 @@ rustPlatform.buildRustPackage rec {
   cargoSha256 = "184s432a6damzvl0lv6jar1iml9dq60r190aqjy44lcg938981zc";
 
   nativeBuildInputs = [ pkgconfig file perl cmake ];
-  buildInputs = [ libgit2 ];
-  propagatedBuildInputs = [ openssl_1_1_0 libssh2 libzip ];
+  buildInputs = [ openssl_1_1_0 libssh2 libgit2 libzip ];
+
+  postInstall = ''
+    install -Dm 755 "${pname}.bash" "$out/etc/bash_completion.d/${pname}"
+    install -Dm 755 "${pname}.fish" "$out/share/fish/vendor_completions.d/${pname}"
+  '';
 
   meta = with lib; {
     description = "powerline-shell rewritten in Rust, inspired by powerline-go";