diff options
author | Niklas Hambüchen <mail@nh2.me> | 2021-06-24 03:27:29 +0200 |
---|---|---|
committer | Niklas Hambüchen <mail@nh2.me> | 2021-06-24 13:27:19 +0200 |
commit | d22a56122503069f7d58563c5a36fa10667b2580 (patch) | |
tree | f3b1df6d9908a3a9cf4d546e7c9eb2b279b6d050 /pkgs/applications/version-management/git-and-tools | |
parent | 959c4e82bc0972bae00f1501821812a7f27e1956 (diff) | |
download | nixpkgs-d22a56122503069f7d58563c5a36fa10667b2580.tar nixpkgs-d22a56122503069f7d58563c5a36fa10667b2580.tar.gz nixpkgs-d22a56122503069f7d58563c5a36fa10667b2580.tar.bz2 nixpkgs-d22a56122503069f7d58563c5a36fa10667b2580.tar.lz nixpkgs-d22a56122503069f7d58563c5a36fa10667b2580.tar.xz nixpkgs-d22a56122503069f7d58563c5a36fa10667b2580.tar.zst nixpkgs-d22a56122503069f7d58563c5a36fa10667b2580.zip |
git-branchless: init at 0.3.2
Diffstat (limited to 'pkgs/applications/version-management/git-and-tools')
-rw-r--r-- | pkgs/applications/version-management/git-and-tools/git-branchless/default.nix | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/pkgs/applications/version-management/git-and-tools/git-branchless/default.nix b/pkgs/applications/version-management/git-and-tools/git-branchless/default.nix new file mode 100644 index 00000000000..c80db8ee958 --- /dev/null +++ b/pkgs/applications/version-management/git-and-tools/git-branchless/default.nix @@ -0,0 +1,49 @@ +{ lib, fetchFromGitHub + +, coreutils +, git +, ncurses +, rustPlatform +, sqlite +}: + +rustPlatform.buildRustPackage rec { + pname = "git-branchless"; + version = "0.3.2"; + + src = fetchFromGitHub { + owner = "arxanas"; + repo = "git-branchless"; + rev = "v${version}"; + sha256 = "0pfiyb23ah1h6risrhjr8ky7b1k1f3yfc3z70s92q3czdlrk6k07"; + }; + + cargoSha256 = "0gplx80xhpz8kwry7l4nv4rlj9z02jg0sgb6zy1y3vd9s2j5wals"; + + # Remove path hardcodes patching if they get fixed upstream, see: + # https://github.com/arxanas/git-branchless/issues/26 + postPatch = '' + # Inline test hardcodes `echo` location. + substituteInPlace ./src/commands/wrap.rs --replace '/bin/echo' '${coreutils}/bin/echo' + + # Tests in general hardcode `git` location. + substituteInPlace ./src/testing.rs --replace '/usr/bin/git' '${git}/bin/git' + ''; + + buildInputs = [ + ncurses + sqlite + ]; + + preCheck = '' + # Tests require path to git. + export PATH_TO_GIT=${git}/bin/git + ''; + + 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.asl20; + maintainers = with maintainers; [ nh2 ]; + }; +} |