1{ lib, stdenv, rustPlatform, fetchFromGitHub, libiconv, perl, python3, Security, AppKit, openssl, xclip, pkg-config }:
2rustPlatform.buildRustPackage rec {
3 pname = "gitui";
4 version = "0.18.0";
5
6 src = fetchFromGitHub {
7 owner = "extrawurst";
8 repo = pname;
9 rev = "v${version}";
10 sha256 = "sha256-NzE2eT3QxnbDW63Cnv6M7IlYgb2XuymphwaL1PTfcyQ=";
11 };
12
13 cargoSha256 = "sha256-9SWovdjYfeneqOVl+I+tuJTIC/htC7h1tXi2KUbdYb8=";
14
15 nativeBuildInputs = [ python3 perl pkg-config ];
16 buildInputs = [ openssl ]
17 ++ lib.optional stdenv.isLinux xclip
18 ++ lib.optionals stdenv.isDarwin [ libiconv Security AppKit ];
19
20 # Needed to get openssl-sys to use pkg-config.
21 OPENSSL_NO_VENDOR = 1;
22
23 meta = with lib; {
24 description = "Blazing fast terminal-ui for git written in rust";
25 homepage = "https://github.com/extrawurst/gitui";
26 license = licenses.mit;
27 maintainers = with maintainers; [ Br1ght0ne yanganto ];
28 };
29}