2021-01-17 04:51:22 +01:00
|
|
|
{ stdenv, lib, rustPlatform, fetchFromGitLab, pkg-config, file, perl, curl, cmake, openssl, libssh2, libgit2, libzip, Security }:
|
2019-10-25 11:24:21 +02:00
|
|
|
|
2018-05-05 11:37:37 +02:00
|
|
|
rustPlatform.buildRustPackage rec {
|
2018-05-06 13:17:32 +02:00
|
|
|
pname = "powerline-rs";
|
2019-10-25 11:24:21 +02:00
|
|
|
version = "0.2.0";
|
2018-05-05 11:37:37 +02:00
|
|
|
|
2018-10-28 14:21:12 +01:00
|
|
|
src = fetchFromGitLab {
|
2018-05-05 11:37:37 +02:00
|
|
|
owner = "jD91mZM2";
|
|
|
|
repo = "powerline-rs";
|
2019-10-25 11:24:21 +02:00
|
|
|
rev = version;
|
2018-10-28 14:21:12 +01:00
|
|
|
|
2019-10-25 11:24:21 +02:00
|
|
|
sha256 = "0rqlxxl58dpfvm2idhi0vzinraf4bgiapmawiih9wxs599fnhm3y";
|
2018-05-05 11:37:37 +02:00
|
|
|
};
|
|
|
|
|
2020-02-28 05:34:03 +01:00
|
|
|
cargoSha256 = "0a41a6kgwgz4040c2369jldvk6xy6s6fkgayca0qy7hdwc4bcxdp";
|
2018-05-05 11:37:37 +02:00
|
|
|
|
2021-01-17 04:51:22 +01:00
|
|
|
nativeBuildInputs = [ pkg-config file perl cmake curl ];
|
2018-09-13 01:56:08 +02:00
|
|
|
buildInputs = [ openssl libssh2 libgit2 libzip ] ++ lib.optional stdenv.isDarwin Security;
|
2018-05-06 13:17:32 +02:00
|
|
|
|
2018-10-28 14:21:12 +01:00
|
|
|
COMPLETION_OUT = "out";
|
2018-05-06 13:17:32 +02:00
|
|
|
postInstall = ''
|
2020-11-12 22:22:18 +01:00
|
|
|
install -Dm 755 "${COMPLETION_OUT}/${pname}.bash" "$out/share/bash-completion/completions/${pname}"
|
2018-10-28 14:21:12 +01:00
|
|
|
install -Dm 755 "${COMPLETION_OUT}/${pname}.fish" "$out/share/fish/vendor_completions.d/${pname}"
|
2018-05-06 13:17:32 +02:00
|
|
|
'';
|
2018-05-05 11:37:37 +02:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "powerline-shell rewritten in Rust, inspired by powerline-go";
|
2018-05-06 07:28:42 +02:00
|
|
|
license = licenses.mit;
|
2018-05-05 11:37:37 +02:00
|
|
|
maintainers = with maintainers; [ jD91mZM2 ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|