depot/third_party/nixpkgs/pkgs/applications/version-management/git-and-tools/git-branchless/default.nix
Default email ce641f4048 Project import generated by Copybara.
GitOrigin-RevId: bc5d68306b40b8522ffb69ba6cff91898c2fbbff
2021-12-06 17:07:01 +01:00

57 lines
1.2 KiB
Nix

{ lib
, fetchFromGitHub
, fetchpatch
, git
, libiconv
, ncurses
, openssl
, pkg-config
, rustPlatform
, sqlite
, stdenv
, Security
, SystemConfiguration
}:
rustPlatform.buildRustPackage rec {
pname = "git-branchless";
version = "0.3.8";
src = fetchFromGitHub {
owner = "arxanas";
repo = "git-branchless";
rev = "v${version}";
sha256 = "sha256-eDVC1tvAkCioV0Mi5f/Qkc0MMTNaoFXuvWXpllZ7PgE=";
};
cargoSha256 = "sha256-wtG/WTmZ13jxIawI9j9QKQm7jPx5TUs7MjqX+lq/Vf0=";
nativeBuildInputs = [ pkg-config ];
buildInputs = [
ncurses
openssl
sqlite
] ++ lib.optionals stdenv.isDarwin [
Security
SystemConfiguration
libiconv
];
preCheck = ''
export PATH_TO_GIT=${git}/bin/git
export GIT_EXEC_PATH=$(${git}/bin/git --exec-path)
'';
# FIXME: these tests deadlock when run in the Nix sandbox
checkFlags = [
"--skip=test_checkout_pty"
"--skip=test_next_ambiguous_interactive"
];
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";
license = licenses.gpl2Only;
maintainers = with maintainers; [ msfjarvis nh2 hmenke ];
};
}