lol
1{ lib
2, fetchFromGitHub
3, fetchpatch
4, git
5, libiconv
6, ncurses
7, openssl
8, pkg-config
9, rustPlatform
10, sqlite
11, stdenv
12, Security
13, SystemConfiguration
14}:
15
16rustPlatform.buildRustPackage rec {
17 pname = "git-branchless";
18 version = "0.3.7";
19
20 src = fetchFromGitHub {
21 owner = "arxanas";
22 repo = "git-branchless";
23 rev = "v${version}";
24 sha256 = "sha256-knRRjTjnhpedcQTVpJnBsrnaeRbjZ2i3aABeE0LrQ+c=";
25 };
26
27 cargoSha256 = "sha256-NyzsY5d4iC3zMSzmh9Qmd211oT6lmhUdvIfQdnzrtok=";
28
29 nativeBuildInputs = [ pkg-config ];
30
31 buildInputs = [
32 ncurses
33 openssl
34 sqlite
35 ] ++ lib.optionals stdenv.isDarwin [
36 Security
37 SystemConfiguration
38 libiconv
39 ];
40
41 preCheck = ''
42 export PATH_TO_GIT=${git}/bin/git
43 export GIT_EXEC_PATH=$(${git}/bin/git --exec-path)
44 '';
45
46 meta = with lib; {
47 description = "A suite of tools to help you visualize, navigate, manipulate, and repair your commit history";
48 homepage = "https://github.com/arxanas/git-branchless";
49 license = licenses.gpl2Only;
50 maintainers = with maintainers; [ msfjarvis nh2 hmenke ];
51 };
52}