| 1 | # Contributor: Jakub Jirutka <[email protected]> |
| 2 | # Maintainer: Jakub Jirutka <[email protected]> |
| 3 | pkgname=git-branchless |
| 4 | pkgver=0.10.0 |
| 5 | pkgrel=2 |
| 6 | pkgdesc="Suite of tools to help you visualize, navigate, manipulate, and repair your commit graph" |
| 7 | url="https://github.com/arxanas/git-branchless" |
| 8 | # riscv64: test fails |
| 9 | # s390x, loongarch64: nix crate fails to build |
| 10 | arch="all !riscv64 !s390x !loongarch64" |
| 11 | license="MIT OR Apache-2.0" |
| 12 | makedepends=" |
| 13 | cargo |
| 14 | cargo-auditable |
| 15 | libgit2-dev |
| 16 | libssh2-dev |
| 17 | openssl-dev>3 |
| 18 | sqlite-dev |
| 19 | " |
| 20 | checkdepends=" |
| 21 | bash |
| 22 | git |
| 23 | " |
| 24 | subpackages="$pkgname-doc" |
| 25 | source="https://github.com/arxanas/git-branchless/archive/v$pkgver/git-branchless-$pkgver.tar.gz |
| 26 | 001-unbundle-sqlite.patch |
| 27 | 002-bump-libgit2.patch |
| 28 | 003-fix-esl01-indexedlog.patch |
| 29 | " |
| 30 | options="net !check" |
| 31 | |
| 32 | export LIBSSH2_SYS_USE_PKG_CONFIG=1 # use system libssh2 |
| 33 | export LIBGIT2_NO_VENDOR=1 # use system libgit2 |
| 34 | |
| 35 | prepare() { |
| 36 | cargo fetch --target="$CTARGET" --locked |
| 37 | |
| 38 | # We need to vendor the esl01-indexedlog crate so we can patch it. |
| 39 | cargo vendor |
| 40 | |
| 41 | default_prepare |
| 42 | } |
| 43 | |
| 44 | build() { |
| 45 | cargo auditable build --release |
| 46 | } |
| 47 | |
| 48 | check() { |
| 49 | # NOTE: The first two skipped tests hang on CI, see |
| 50 | # https://github.com/arxanas/git-branchless/pull/159 for more info. |
| 51 | # The last two are probably broken. |
| 52 | # https://github.com/arxanas/git-branchless/pull/1416 |
| 53 | # Several tests are broken with git 2.46 and 2.48 |
| 54 | # everything from test_amend_undo to test_test_verify |
| 55 | TEST_GIT_EXEC_PATH=$(git --exec-path) \ |
| 56 | TEST_GIT=$(which git) \ |
| 57 | RUST_BACKTRACE=1 \ |
| 58 | cargo test --workspace --frozen -- \ |
| 59 | --skip=test_amend_undo \ |
| 60 | --skip=test_symbolic_transaction_ref \ |
| 61 | --skip=test_move_branch_on_merge_conflict_resolution \ |
| 62 | --skip=test_move_branches_after_move \ |
| 63 | --skip=test_move_delete_checked_out_branch \ |
| 64 | --skip=test_move_no_reapply_squashed_commits \ |
| 65 | --skip=test_move_orphaned_root \ |
| 66 | --skip=test_restore_snapshot_basic \ |
| 67 | --skip=test_restore_snapshot_delete_file_only_in_index \ |
| 68 | --skip=test_restore_snapshot_deleted_files \ |
| 69 | --skip=test_sync_basic \ |
| 70 | --skip=test_sync_no_delete_main_branch \ |
| 71 | --skip=test_undo_doesnt_make_working_dir_dirty \ |
| 72 | --skip=test_undo_move_refs \ |
| 73 | --skip=test_undo_noninteractive \ |
| 74 | --skip=test_abandoned_commit_message \ |
| 75 | --skip=test_hook_appended_to_existing_contents \ |
| 76 | --skip=test_repair_broken_branch \ |
| 77 | --skip=test_hook_working_dir |
| 78 | } |
| 79 | |
| 80 | package() { |
| 81 | install -D -m755 target/release/git-branchless -t "$pkgdir"/usr/bin/ |
| 82 | ./target/release/git-branchless install-man-pages "$pkgdir"/usr/share/man/ |
| 83 | } |
| 84 | |
| 85 | sha512sums=" |
| 86 | 568048b687bb566d46b457643b939c9e7096634979f22082ca4622199437ad497b860ce95f5c459c458a90eeef484858b35d0c9863e745d4500deb0e511ea1cf git-branchless-0.10.0.tar.gz |
| 87 | f9e38c5449ee0f149ed0acdb3aef56811671abb6afc8c0bdbeb58f0c782f9d87d4f5e4bf4629685a150f0882840eb9f3cfb6be1849ab3f92e98e2d161651d012 001-unbundle-sqlite.patch |
| 88 | d9f2515bfab24932e0912f141a88f14e972ee727261abebba568a7855ad6c79d54d20999c2bd3aeea11813b7fdca551bc7b6e0f066b8dfd65cccc878534916a4 002-bump-libgit2.patch |
| 89 | 148af9dc13bcb8c9ec3f67b2c0fb4c16ab6f86ef4d669d5c4d7a5214b6c8f64dfea5704501edae885298469d5bef1e35229c0f4d5ed618f99d629ee93e0549bf 003-fix-esl01-indexedlog.patch |
| 90 | " |