2022-04-27 09:35:20 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, rustPlatform, libiconv, Security }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "git-interactive-rebase-tool";
|
2023-08-04 22:07:22 +00:00
|
|
|
version = "2.3.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "MitMaro";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2023-08-04 22:07:22 +00:00
|
|
|
sha256 = "sha256-tMeA2LsNCXxI086y8S+STYwjClWMPaBheP0s0oZ5I5c=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
postPatch = ''
|
|
|
|
# unknown lint: `ffi_unwind_calls`
|
|
|
|
# note: the `ffi_unwind_calls` lint is unstable
|
|
|
|
substituteInPlace src/main.rs src/{config,core,display,input,git,runtime,todo_file,testutils,view}/src/lib.rs \
|
|
|
|
--replace "ffi_unwind_calls," ""
|
|
|
|
'';
|
|
|
|
|
|
|
|
cargoLock = {
|
|
|
|
lockFile = ./Cargo.lock;
|
|
|
|
outputHashes = {
|
|
|
|
"claim-0.5.0" = "sha256-quVV5PnWW1cYK+iSOM/Y0gLu2gPOrZ1ytJif0D5v9g0=";
|
|
|
|
};
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [ libiconv Security ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
# Compilation during tests fails if this env var is not set.
|
|
|
|
preCheck = "export GIRT_BUILD_GIT_HASH=${version}";
|
|
|
|
postCheck = "unset GIRT_BUILD_GIT_HASH";
|
|
|
|
cargoTestFlags = [
|
|
|
|
"--workspace"
|
|
|
|
# build everything except for doctests which are currently broken because
|
|
|
|
# `config::lib` expects the sourcetree to be a git repo.
|
|
|
|
"--tests"
|
|
|
|
"--lib"
|
|
|
|
"--bins"
|
2021-04-22 02:08:21 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/MitMaro/git-interactive-rebase-tool";
|
|
|
|
description = "Native cross platform full feature terminal based sequence editor for git interactive rebase";
|
|
|
|
changelog = "https://github.com/MitMaro/git-interactive-rebase-tool/releases/tag/${version}";
|
|
|
|
license = licenses.mit;
|
2023-08-04 22:07:22 +00:00
|
|
|
maintainers = with maintainers; [ SuperSandro2000 zowoq ma27 ];
|
2022-04-27 09:35:20 +00:00
|
|
|
mainProgram = "interactive-rebase-tool";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|