diff options
author | Robert Schütz <dev@schuetz-co.de> | 2021-06-25 10:02:10 +0200 |
---|---|---|
committer | Robert Schütz <dev@schuetz-co.de> | 2021-06-25 10:02:10 +0200 |
commit | c1dca92daf8de1a7421d412f2fa68fab16a0289a (patch) | |
tree | ab8668d289e2b8393c0540720618cfb3e50eca95 /pkgs/applications/version-management | |
parent | d437a6cac2086ead6232bc4d84c25c58a33c1b59 (diff) | |
parent | 5555f34784ef4013e207097f9da8f2861eb5b9e3 (diff) | |
download | nixpkgs-c1dca92daf8de1a7421d412f2fa68fab16a0289a.tar nixpkgs-c1dca92daf8de1a7421d412f2fa68fab16a0289a.tar.gz nixpkgs-c1dca92daf8de1a7421d412f2fa68fab16a0289a.tar.bz2 nixpkgs-c1dca92daf8de1a7421d412f2fa68fab16a0289a.tar.lz nixpkgs-c1dca92daf8de1a7421d412f2fa68fab16a0289a.tar.xz nixpkgs-c1dca92daf8de1a7421d412f2fa68fab16a0289a.tar.zst nixpkgs-c1dca92daf8de1a7421d412f2fa68fab16a0289a.zip |
Merge branch 'master' into staging-next
Diffstat (limited to 'pkgs/applications/version-management')
-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 ]; + }; +} |