summaryrefslogtreecommitdiff
path: root/dev-util/prek/prek-0.4.0.ebuild
blob: 8761cf8315ea0a027e7de7573310a1a38486380d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# Copyright 2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

# Autogenerated by pycargoebuild 0.15.1

EAPI=8

CRATES="
"

RUST_MIN_VER="1.93.1"

inherit cargo

DESCRIPTION="Better \`pre-commit\`, re-engineered in Rust"
HOMEPAGE="https://prek.j178.dev/"
SRC_URI="
	${CARGO_CRATE_URIS}
	https://github.com/j178/prek/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
"
if [[ ${PKGBUMPING} != ${PVR} ]]; then
	SRC_URI+="
		mirror://gentoo/${P}-crates.tar.xz
	"
fi

LICENSE="MIT"
# Dependent crate licenses
LICENSE+="
	Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD CDDL
	CDLA-Permissive-2.0 ISC MIT Unicode-3.0 ZLIB
"
SLOT="0"
KEYWORDS="~amd64"

DOCS=(
	CONTRIBUTING.md
	README.md
	CHANGELOG.md
	docs/
)

src_test() {
	local -a CARGO_SKIP_TESTS=(
		# tests that require network access
		check_useless_excludes_remote
	    dart::additional_dependencies
		dart::additional_dependencies_with_version
		dart::dart_environment
		dart::executable_alias
		dart::hook_stderr
		dart::remote_hook
		dart::script_with_files
		dart::with_pubspec
		dart::with_pubspec_and_additional_dependenci
		deno::additional_dependencies
		deno::remote_hook
		deno::remote_hook_with_additional_dependencies
		deno::remote_hook_with_local_file_additional_dependency
		http::tests::test_native_tls
		install_hooks_only
		install_with_hooks

		# tests that don't work in sandbox
		cache_gc_removes_unreferenced_entries

		# tests that require extra dependencies
		bun::additional_dependencies
		bun::basic_bun
		deno::without_system_deno
		docker::docker
		docker::workspace_docker
		docker_image::docker_image
		docker_image::docker_image_does_not_resolve_entry
		golang::local_additional_deps
		golang::remote_go_mod_metadata_sets_language_version
		golang::remote_hook
		haskell::additional_dependencies
		haskell::local_hook
		haskell::remote_hook
		julia::additional_dependencies
		julia::local_hook
		julia::project_toml
		julia::remote_hook
		julia::script_file
		lua::additional_dependencies
		lua::health_check
		lua::hook_stderr
		lua::lua_environment
		lua::remote_hook
		lua::script_with_files
		node::additional_dependencies
		node::additional_dependencies_without_system_node
		node::npm_version
		python::additional_dependencies
		python::additional_dependencies_in_remote_repo
		python::git_env_vars_not_leaked_to_pip_install
		python::pep723_script
		reuse_env
		ruby::additional_gem_dependencies
		ruby::environment_isolation
		ruby::language_version_default
		ruby::multiple_gemspecs
		ruby::native_gem_dependency
		ruby::prebuilt_vs_compiled_gems
		ruby::specific_ruby_available
		ruby::specific_ruby_unavailable
		ruby::system_ruby
		run_basic
		run_in_non_git_repo
		run_last_commit
		rust::additional_dependencies_cli
		rust::remote_hook_non_workspace
		rust::remote_hooks
		rust::remote_hooks_with_lib_deps
		rust::rustup_installer
		same_repo
		script::unix::script_run
		try_repo_relative_path
		try_repo_specific_hook
		try_repo_specific_rev
	)

	cargo_src_test
}

src_install() {
	pushd crates/prek &>/dev/null || die
	cargo_src_install
	popd &>/dev/null || die

	dodoc -r "${DOCS[@]}"
}