nixpkgs/pkgs/applications/version-management/git-branchless/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

58 lines
1.3 KiB
Nix
Raw Normal View History

2021-10-14 21:21:06 +00:00
{ lib
, fetchFromGitHub
2021-06-24 01:27:29 +00:00
, git
, libiconv
2021-06-24 01:27:29 +00:00
, ncurses
2021-10-14 21:21:06 +00:00
, openssl
, pkg-config
2021-06-24 01:27:29 +00:00
, rustPlatform
, sqlite
, stdenv
, Security
, SystemConfiguration
2021-06-24 01:27:29 +00:00
}:
rustPlatform.buildRustPackage rec {
pname = "git-branchless";
2023-03-22 09:04:33 +00:00
version = "0.7.1";
2021-06-24 01:27:29 +00:00
src = fetchFromGitHub {
owner = "arxanas";
repo = "git-branchless";
rev = "v${version}";
2023-03-22 09:04:33 +00:00
sha256 = "sha256-9kyC9Uwmc2WNHgfKpnS3v8vNF2o+168ULWqE+2eX1cE=";
2021-06-24 01:27:29 +00:00
};
2023-03-22 09:04:33 +00:00
cargoHash = "sha256-k+Jx5PcA8TaFQQDYqZ6dTy8bwNtYeALF75ucoFjVGUc=";
2021-06-24 01:27:29 +00:00
2021-10-14 21:21:06 +00:00
nativeBuildInputs = [ pkg-config ];
2021-06-24 01:27:29 +00:00
buildInputs = [
ncurses
2021-10-14 21:21:06 +00:00
openssl
2021-06-24 01:27:29 +00:00
sqlite
2021-10-14 21:21:06 +00:00
] ++ lib.optionals stdenv.isDarwin [
Security
SystemConfiguration
libiconv
2021-06-24 01:27:29 +00:00
];
preCheck = ''
2022-03-27 23:39:51 +00:00
export TEST_GIT=${git}/bin/git
export TEST_GIT_EXEC_PATH=$(${git}/bin/git --exec-path)
2021-06-24 01:27:29 +00:00
'';
2021-12-05 13:08:35 +00:00
# FIXME: these tests deadlock when run in the Nix sandbox
checkFlags = [
2022-11-16 09:15:20 +00:00
"--skip=test_switch_pty"
2021-12-05 13:08:35 +00:00
"--skip=test_next_ambiguous_interactive"
2022-11-16 09:15:20 +00:00
"--skip=test_switch_auto_switch_interactive"
2021-12-05 13:08:35 +00:00
];
2021-06-24 01:27:29 +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-14 21:21:06 +00:00
license = licenses.gpl2Only;
maintainers = with maintainers; [ msfjarvis nh2 hmenke ];
2021-06-24 01:27:29 +00:00
};
}