1 { stdenv, lib, rustPlatform, fetchFromGitLab, pkg-config, file, perl, curl, cmake, openssl, libssh2, libgit2, libzip, Security }:
3 rustPlatform.buildRustPackage rec {
4 pname = "powerline-rs";
7 src = fetchFromGitLab {
12 sha256 = "0rqlxxl58dpfvm2idhi0vzinraf4bgiapmawiih9wxs599fnhm3y";
15 cargoHash = "sha256-NAhLTrTshCm1QKGaOdD/YaqD6c3oYZwVBst8fvTlScQ=";
17 nativeBuildInputs = [ pkg-config file perl cmake curl ];
18 buildInputs = [ openssl libssh2 libgit2 libzip ] ++ lib.optional stdenv.hostPlatform.isDarwin Security;
20 COMPLETION_OUT = "out";
22 install -Dm 755 "${COMPLETION_OUT}/powerline-rs.bash" "$out/share/bash-completion/completions/powerline-rs"
23 install -Dm 755 "${COMPLETION_OUT}/powerline-rs.fish" "$out/share/fish/vendor_completions.d/powerline-rs"
27 description = "powerline-shell rewritten in Rust, inspired by powerline-go";
28 license = licenses.mit;
30 platforms = platforms.unix;
31 mainProgram = "powerline-rs";