Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / applications / version-management / git-interactive-rebase-tool / default.nix
blob176e2714753680346a66d6fc69148d67ce8a96dd
1 { lib, stdenv, fetchFromGitHub, rustPlatform, libiconv, Security }:
3 rustPlatform.buildRustPackage rec {
4   pname = "git-interactive-rebase-tool";
5   version = "2.3.0";
7   src = fetchFromGitHub {
8     owner = "MitMaro";
9     repo = pname;
10     rev = version;
11     sha256 = "sha256-tMeA2LsNCXxI086y8S+STYwjClWMPaBheP0s0oZ5I5c=";
12   };
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   '';
21   cargoLock = {
22     lockFile = ./Cargo.lock;
23     outputHashes = {
24       "claim-0.5.0" = "sha256-quVV5PnWW1cYK+iSOM/Y0gLu2gPOrZ1ytJif0D5v9g0=";
25     };
26   };
28   buildInputs = lib.optionals stdenv.isDarwin [ libiconv Security ];
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   ];
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   };