at 23.11-beta 50 lines 1.7 kB view raw
1{ lib, stdenv, fetchFromGitHub, rustPlatform, libiconv, Security }: 2 3rustPlatform.buildRustPackage rec { 4 pname = "git-interactive-rebase-tool"; 5 version = "2.3.0"; 6 7 src = fetchFromGitHub { 8 owner = "MitMaro"; 9 repo = pname; 10 rev = version; 11 sha256 = "sha256-tMeA2LsNCXxI086y8S+STYwjClWMPaBheP0s0oZ5I5c="; 12 }; 13 14 postPatch = '' 15 # unknown lint: `ffi_unwind_calls` 16 # note: the `ffi_unwind_calls` lint is unstable 17 substituteInPlace src/main.rs src/{config,core,display,input,git,runtime,todo_file,testutils,view}/src/lib.rs \ 18 --replace "ffi_unwind_calls," "" 19 ''; 20 21 cargoLock = { 22 lockFile = ./Cargo.lock; 23 outputHashes = { 24 "claim-0.5.0" = "sha256-quVV5PnWW1cYK+iSOM/Y0gLu2gPOrZ1ytJif0D5v9g0="; 25 }; 26 }; 27 28 buildInputs = lib.optionals stdenv.isDarwin [ libiconv Security ]; 29 30 # Compilation during tests fails if this env var is not set. 31 preCheck = "export GIRT_BUILD_GIT_HASH=${version}"; 32 postCheck = "unset GIRT_BUILD_GIT_HASH"; 33 cargoTestFlags = [ 34 "--workspace" 35 # build everything except for doctests which are currently broken because 36 # `config::lib` expects the sourcetree to be a git repo. 37 "--tests" 38 "--lib" 39 "--bins" 40 ]; 41 42 meta = with lib; { 43 homepage = "https://github.com/MitMaro/git-interactive-rebase-tool"; 44 description = "Native cross platform full feature terminal based sequence editor for git interactive rebase"; 45 changelog = "https://github.com/MitMaro/git-interactive-rebase-tool/releases/tag/${version}"; 46 license = licenses.mit; 47 maintainers = with maintainers; [ SuperSandro2000 zowoq ma27 ]; 48 mainProgram = "interactive-rebase-tool"; 49 }; 50}