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-02-10 20:34:41 +00:00
|
|
|
version = "0.3.9";
|
2021-06-28 23:13:55 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "arxanas";
|
|
|
|
repo = "git-branchless";
|
|
|
|
rev = "v${version}";
|
2022-02-10 20:34:41 +00:00
|
|
|
sha256 = "sha256-SEmIZy8ql1MxcFR6zeif03DVha/SRZHajVwt3QOBBYU=";
|
2021-06-28 23:13:55 +00:00
|
|
|
};
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
cargoSha256 = "sha256-mKfPxU1JoN/xLdPdwy3vo1M0qF9ag0T4Ls4dfvHn6Pc=";
|
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 = ''
|
|
|
|
export PATH_TO_GIT=${git}/bin/git
|
2021-10-17 09:34:42 +00:00
|
|
|
export 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
|
|
|
};
|
|
|
|
}
|