2018-05-20 23:55:21 +01:00
|
|
|
{ stdenv, lib, rustPlatform, fetchFromGitHub, pkgconfig, file, perl, curl, cmake, openssl_1_1_0, libssh2, libgit2, libzip, Security }:
|
2018-05-05 10:37:37 +01:00
|
|
|
rustPlatform.buildRustPackage rec {
|
2018-05-06 12:17:32 +01:00
|
|
|
pname = "powerline-rs";
|
|
|
|
name = "${pname}-${version}";
|
2018-06-09 07:40:19 +01:00
|
|
|
version = "0.1.8";
|
2018-05-05 10:37:37 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jD91mZM2";
|
|
|
|
repo = "powerline-rs";
|
|
|
|
rev = version;
|
|
|
|
|
2018-06-09 07:40:19 +01:00
|
|
|
sha256 = "018i9qq98afbgv0nxs1n83zb09lqhqxpdrd95f2maic3rr5ngnj5";
|
2018-05-05 10:37:37 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
cargoSha256 = "184s432a6damzvl0lv6jar1iml9dq60r190aqjy44lcg938981zc";
|
|
|
|
|
2018-05-20 23:55:21 +01:00
|
|
|
nativeBuildInputs = [ pkgconfig file perl cmake curl ];
|
|
|
|
buildInputs = [ openssl_1_1_0 libssh2 libgit2 libzip ] ++ lib.optional stdenv.isDarwin Security;
|
2018-05-06 12:17:32 +01:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
install -Dm 755 "${pname}.bash" "$out/etc/bash_completion.d/${pname}"
|
|
|
|
install -Dm 755 "${pname}.fish" "$out/share/fish/vendor_completions.d/${pname}"
|
|
|
|
'';
|
2018-05-05 10:37:37 +01:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "powerline-shell rewritten in Rust, inspired by powerline-go";
|
2018-05-06 06:28:42 +01:00
|
|
|
license = licenses.mit;
|
2018-05-05 10:37:37 +01:00
|
|
|
maintainers = with maintainers; [ jD91mZM2 ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|