2021-10-17 09:34:42 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, fetchpatch
|
2021-06-28 23:13:55 +00:00
|
|
|
, git
|
2021-09-18 10:52:07 +00:00
|
|
|
, libiconv
|
2021-06-28 23:13:55 +00:00
|
|
|
, ncurses
|
2021-10-17 09:34:42 +00:00
|
|
|
, openssl
|
|
|
|
, pkg-config
|
2021-06-28 23:13:55 +00:00
|
|
|
, rustPlatform
|
|
|
|
, sqlite
|
2021-09-18 10:52:07 +00:00
|
|
|
, stdenv
|
|
|
|
, Security
|
|
|
|
, SystemConfiguration
|
2021-06-28 23:13:55 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "git-branchless";
|
2022-08-12 12:06:08 +00:00
|
|
|
version = "0.4.0";
|
2021-06-28 23:13:55 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "arxanas";
|
|
|
|
repo = "git-branchless";
|
|
|
|
rev = "v${version}";
|
2022-08-12 12:06:08 +00:00
|
|
|
sha256 = "sha256-WFrN5TRFr9xHBUawTfvri0qlTiWCfAeC5SL+T6mwlU0=";
|
2021-06-28 23:13:55 +00:00
|
|
|
};
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
cargoSha256 = "sha256-AGW1jUKPc5iiuDlgIDHG1sOn1flAB3UdxJJNKPH5+f8=";
|
2021-06-28 23:13:55 +00:00
|
|
|
|
2021-10-17 09:34:42 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2021-06-28 23:13:55 +00:00
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
ncurses
|
2021-10-17 09:34:42 +00:00
|
|
|
openssl
|
2021-06-28 23:13:55 +00:00
|
|
|
sqlite
|
2021-10-17 09:34:42 +00:00
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
2021-09-18 10:52:07 +00:00
|
|
|
Security
|
|
|
|
SystemConfiguration
|
|
|
|
libiconv
|
2021-06-28 23:13:55 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
preCheck = ''
|
2022-03-30 09:31:56 +00:00
|
|
|
export TEST_GIT=${git}/bin/git
|
|
|
|
export TEST_GIT_EXEC_PATH=$(${git}/bin/git --exec-path)
|
2021-06-28 23:13:55 +00:00
|
|
|
'';
|
2021-12-06 16:07:01 +00:00
|
|
|
# FIXME: these tests deadlock when run in the Nix sandbox
|
|
|
|
checkFlags = [
|
|
|
|
"--skip=test_checkout_pty"
|
|
|
|
"--skip=test_next_ambiguous_interactive"
|
|
|
|
];
|
2021-06-28 23:13:55 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A suite of tools to help you visualize, navigate, manipulate, and repair your commit history";
|
|
|
|
homepage = "https://github.com/arxanas/git-branchless";
|
2021-10-17 09:34:42 +00:00
|
|
|
license = licenses.gpl2Only;
|
|
|
|
maintainers = with maintainers; [ msfjarvis nh2 hmenke ];
|
2021-06-28 23:13:55 +00:00
|
|
|
};
|
|
|
|
}
|