2022-02-10 20:34:41 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, libiconv
|
|
|
|
, openssl
|
|
|
|
, pkg-config
|
|
|
|
, xclip
|
|
|
|
, AppKit
|
|
|
|
, Security
|
|
|
|
}:
|
|
|
|
|
2020-05-03 17:38:23 +00:00
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "gitui";
|
2022-11-27 09:42:12 +00:00
|
|
|
version = "0.22.1";
|
2020-05-03 17:38:23 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "extrawurst";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-11-27 09:42:12 +00:00
|
|
|
sha256 = "sha256-K6xWTPu2a5NKYAYBt/sCWQOmuw9TCoKPA4ZxkoLWmeY=";
|
2020-05-03 17:38:23 +00:00
|
|
|
};
|
|
|
|
|
2022-11-27 09:42:12 +00:00
|
|
|
cargoSha256 = "sha256-MZrx72poA6uOIulWIQkfOr9gy5qr5f61UtLITfES/rk=";
|
2022-02-10 20:34:41 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2020-05-03 17:38:23 +00:00
|
|
|
|
2020-12-25 13:55:36 +00:00
|
|
|
buildInputs = [ openssl ]
|
2021-01-17 00:15:33 +00:00
|
|
|
++ lib.optional stdenv.isLinux xclip
|
|
|
|
++ lib.optionals stdenv.isDarwin [ libiconv Security AppKit ];
|
2020-05-03 17:38:23 +00:00
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
# Needed to get openssl-sys to use pkg-config.
|
|
|
|
OPENSSL_NO_VENDOR = 1;
|
|
|
|
|
2022-11-21 17:40:18 +00:00
|
|
|
# The cargo config overrides linkers for some targets, breaking the build
|
|
|
|
# on e.g. `aarch64-linux`. These overrides are not required in the Nix
|
|
|
|
# environment: delete them.
|
|
|
|
postPatch = "rm .cargo/config";
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2022-02-10 20:34:41 +00:00
|
|
|
description = "Blazing fast terminal-ui for Git written in Rust";
|
2020-05-03 17:38:23 +00:00
|
|
|
homepage = "https://github.com/extrawurst/gitui";
|
|
|
|
license = licenses.mit;
|
2020-11-19 00:13:47 +00:00
|
|
|
maintainers = with maintainers; [ Br1ght0ne yanganto ];
|
2020-05-03 17:38:23 +00:00
|
|
|
};
|
|
|
|
}
|