mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-28 18:03:04 +00:00
Merge pull request #141787 from hmenke/git-branchless
This commit is contained in:
commit
9c941ccefc
@ -1,9 +1,11 @@
|
||||
{ lib, fetchFromGitHub
|
||||
|
||||
, coreutils
|
||||
{ lib
|
||||
, fetchFromGitHub
|
||||
, fetchpatch
|
||||
, git
|
||||
, libiconv
|
||||
, ncurses
|
||||
, openssl
|
||||
, pkg-config
|
||||
, rustPlatform
|
||||
, sqlite
|
||||
, stdenv
|
||||
@ -13,45 +15,38 @@
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "git-branchless";
|
||||
version = "0.3.2";
|
||||
version = "0.3.6-nixos.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "arxanas";
|
||||
repo = "git-branchless";
|
||||
rev = "v${version}";
|
||||
sha256 = "0pfiyb23ah1h6risrhjr8ky7b1k1f3yfc3z70s92q3czdlrk6k07";
|
||||
sha256 = "sha256-Sq+43w7xgrCe2w+9A/gfe/34+K2IgZVholtD+WF59Qo=";
|
||||
};
|
||||
|
||||
cargoSha256 = "0gplx80xhpz8kwry7l4nv4rlj9z02jg0sgb6zy1y3vd9s2j5wals";
|
||||
cargoSha256 = "sha256-tCpvIqGMklOUJ/+d8poq4uz2EyZTkBmtlkA/BUIVPxs=";
|
||||
|
||||
# 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'
|
||||
'';
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
|
||||
buildInputs = [
|
||||
ncurses
|
||||
openssl
|
||||
sqlite
|
||||
] ++ lib.optionals (stdenv.isDarwin) [
|
||||
] ++ lib.optionals stdenv.isDarwin [
|
||||
Security
|
||||
SystemConfiguration
|
||||
libiconv
|
||||
];
|
||||
|
||||
preCheck = ''
|
||||
# Tests require path to git.
|
||||
export PATH_TO_GIT=${git}/bin/git
|
||||
export GIT_EXEC_PATH=$(${git}/bin/git --exec-path)
|
||||
'';
|
||||
|
||||
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; [ msfjarvis nh2 ];
|
||||
license = licenses.gpl2Only;
|
||||
maintainers = with maintainers; [ msfjarvis nh2 hmenke ];
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user