# Copyright 2026 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # Autogenerated by pycargoebuild 0.15.1 # update using this command: # pycargoebuild --use-crate-tarball --force -i tombi-1.9.6.ebuild tombi/rust/tombi EAPI=8 RUST_MIN_VER="1.88.0" CRATES=" " inherit cargo shell-completion DESCRIPTION="TOML Formatter / Linter / Language Server" HOMEPAGE="https://tombi-toml.github.io/tombi/" SRC_URI=" https://github.com/tombi-toml/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz https://github.com/ingenarel/${PN}/releases/download/v${PV}/${P}-crates.tar.xz https://github.com/ingenarel/${PN}/releases/download/v${PV}/json-tarball.tar.xz -> ${P}-json-tarball.tar.xz ${CARGO_CRATE_URIS} " LICENSE="MIT" # Dependent crate licenses LICENSE+=" Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD ISC MIT MPL-2.0 Unicode-3.0 ZLIB " SLOT="0" KEYWORDS="~amd64 ~arm64" RESTRICT="mirror" src_test(){ export TOMBI_CACHE_HOME="${WORKDIR}/cache" export TOMBI_OFFLINE=true # these tests will fail even after the schema files are there in the cache, since the tests are still trying to # access the network. # you can get a list of tests that are failing by doing this: # sed -nE 's/^test\s(\S+).+\.\.\.\s.....FAILED....$/\1/p' temp/build.log # make sure that you read why the tests are failing tho, and not simply blinding ignoring the tests in here local CARGO_SKIP_TESTS=( 'completion_labels::all_of_forbidden_keys_schema::pattern_properties_false_keeps_declared_properties' 'completion_labels::cargo_schema::cargo_dependencies_num_chrono_duration_equal_version_equal' 'completion_labels::cargo_schema::cargo_dependencies_path_completion_local_prefix' 'get_status::issue_1548_schema_toml_version::config_toml_version_fallback' 'get_status::issue_1548_schema_toml_version::default_toml_version_when_none_specified' 'get_status::issue_1548_schema_toml_version::schema_toml_version_is_applied' 'get_status::issue_1548_schema_toml_version::selected_schema_keeps_priority_after_rebuild_and_cache_refresh' 'get_status::issue_1548_schema_toml_version::x_tombi_toml_version_from_json_schema' 'hover_keys_value::array_values_order_schema::shows_struck_through_values_order_when_schema_format_rule_is_disabled' 'hover_keys_value::array_values_order_schema::uses_schema_override_for_values_order_in_hover' 'hover_keys_value::built_in_schema_hover_link_uses_github' 'hover_keys_value::cargo_schema::cargo_dependency_table_field_hover_keeps_schema_metadata' 'hover_keys_value::cargo_schema::cargo_profile_release_strip_true' 'hover_keys_value::one_of_schema::adjacent_one_of_reversed_hover_prefers_valid_branch_nested_item_schema' 'hover_keys_value::one_of_schema::one_of_hover_prefers_single_valid_branch' ) # }}} cargo_src_test --no-fail-fast } src_install(){ dobin "$(cargo_target_dir)/tombi" "$(cargo_target_dir)"/tombi completion bash > "${PN}" || die "generating bash completion failed" dobashcomp "${PN}" "$(cargo_target_dir)"/tombi completion zsh > "_${PN}" || die "generating zsh completion failed" dozshcomp "_${PN}" "$(cargo_target_dir)"/tombi completion fish > "${PN}.fish" || die "generating fish completion failed" dofishcomp "${PN}.fish" }