2018-10-28 13:21:12 +00:00
|
|
|
{ stdenv, lib, rustPlatform, fetchFromGitLab, pkgconfig, file, perl, curl, cmake, openssl, 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";
|
2018-10-28 13:21:12 +00:00
|
|
|
version = "0.1.9";
|
2018-05-05 10:37:37 +01:00
|
|
|
|
2018-10-28 13:21:12 +00:00
|
|
|
src = fetchFromGitLab {
|
2018-05-05 10:37:37 +01:00
|
|
|
owner = "jD91mZM2";
|
|
|
|
repo = "powerline-rs";
|
2018-10-28 13:21:12 +00:00
|
|
|
#rev = version;
|
2018-05-05 10:37:37 +01:00
|
|
|
|
2018-10-28 13:21:12 +00:00
|
|
|
# Support for $COMPLETION_OUT:
|
|
|
|
rev = "44679385a95dd9f3ebd9b093f9ef8925610e9a23";
|
|
|
|
|
|
|
|
sha256 = "1mxkw6ydnqjyplbki2j9pbnlhxmkw9qqw54443a3cjmn2g08jyzp";
|
2018-05-05 10:37:37 +01:00
|
|
|
};
|
|
|
|
|
2019-05-25 12:03:08 +01:00
|
|
|
cargoSha256 = "1d0f1c1vp1r9r3ic921xkcr59f4a45y2xbxm4gl6grhb9z6p5k7l";
|
2018-05-05 10:37:37 +01:00
|
|
|
|
2018-05-20 23:55:21 +01:00
|
|
|
nativeBuildInputs = [ pkgconfig file perl cmake curl ];
|
2018-09-13 00:56:08 +01:00
|
|
|
buildInputs = [ openssl libssh2 libgit2 libzip ] ++ lib.optional stdenv.isDarwin Security;
|
2018-05-06 12:17:32 +01:00
|
|
|
|
2018-10-28 13:21:12 +00:00
|
|
|
COMPLETION_OUT = "out";
|
2018-05-06 12:17:32 +01:00
|
|
|
postInstall = ''
|
2018-10-28 13:21:12 +00:00
|
|
|
install -Dm 755 "${COMPLETION_OUT}/${pname}.bash" "$out/etc/bash_completion.d/${pname}"
|
|
|
|
install -Dm 755 "${COMPLETION_OUT}/${pname}.fish" "$out/share/fish/vendor_completions.d/${pname}"
|
2018-05-06 12:17:32 +01:00
|
|
|
'';
|
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;
|
|
|
|
};
|
|
|
|
}
|