commit:     cb3ff4f8ff2a79b9df7c691a09685d81b8b8cb9b
Author:     Jay Faulkner <jayf <AT> gentoo <DOT> org>
AuthorDate: Mon Jun  9 16:56:56 2025 +0000
Commit:     Jay Faulkner <jayf <AT> gentoo <DOT> org>
CommitDate: Mon Jun  9 17:01:32 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cb3ff4f8

dev-util/claude-code: add 1.0.17

Signed-off-by: Jay Faulkner <jayf <AT> gentoo.org>

 dev-util/claude-code/claude-code-1.0.17.ebuild | 56 ++++++++++++++++++++++++++
 1 file changed, 56 insertions(+)

diff --git a/dev-util/claude-code/claude-code-1.0.17.ebuild 
b/dev-util/claude-code/claude-code-1.0.17.ebuild
new file mode 100644
index 000000000000..01d2191addbc
--- /dev/null
+++ b/dev-util/claude-code/claude-code-1.0.17.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit edo
+
+DESCRIPTION="Claude Code - an agentic coding tool by Anthropic"
+HOMEPAGE="https://www.anthropic.com/claude-code";
+SRC_URI="https://registry.npmjs.org/@anthropic-ai/claude-code/-/claude-code-${PV}.tgz";
+S="${WORKDIR}"
+
+# NOTE(JayF): claude-code is only usable via paid subscription and has a
+#             clickthrough EULA-type license. Please see $HOMEPAGE for
+#             full details.
+LICENSE="all-rights-reserved"
+SLOT="0"
+KEYWORDS="~amd64"
+
+QA_PREBUILT="usr/lib64/node_modules/@anthropic-ai/claude-code/vendor/*"
+RESTRICT="strip"
+
+RDEPEND="
+       >=net-libs/nodejs-18
+       sys-apps/ripgrep
+"
+BDEPEND=">=net-libs/nodejs-18[npm]"
+
+src_unpack() {
+       # npm installs the tarball directly
+       :
+}
+
+src_compile() {
+       # Skip, nothing to compile here.
+       :
+}
+
+src_install() {
+       local -a my_npm_opts=(
+               --audit false
+               --color false
+               --foreground-scripts
+               --global
+               --offline
+               --omit dev
+               --prefix "${ED}/usr"
+               --progress false
+               --verbose
+       )
+       edo npm "${my_npm_opts[@]}" install "${DISTDIR}/${P}.tgz"
+
+       rm -r 
"${ED}/usr/lib64/node_modules/@anthropic-ai/claude-code/vendor/ripgrep" || die
+       insinto /etc/claude-code
+       doins "${FILESDIR}/policies.json"
+}

Reply via email to