public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Jay Faulkner" <jayf@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/claude-code/
Date: Wed, 20 Aug 2025 14:57:02 +0000 (UTC)	[thread overview]
Message-ID: <1755701801.c09f604e6ed42024bb8935aad42b5d0c00d2b8bf.jayf@gentoo> (raw)

commit:     c09f604e6ed42024bb8935aad42b5d0c00d2b8bf
Author:     Jay Faulkner <jayf <AT> gentoo <DOT> org>
AuthorDate: Wed Aug 20 14:53:13 2025 +0000
Commit:     Jay Faulkner <jayf <AT> gentoo <DOT> org>
CommitDate: Wed Aug 20 14:56:41 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c09f604e

dev-util/claude-code: add 1.0.85{,-r1}

I am going to maintain parallel releases of claude-code for a couple
weeks, just to ensure that the new ebuild style doesn't break anyone.

The -r1 uses a direct tarball download from the npm mirrors and
extracts it. The stable, not-r1 continues to use the normal npm
install method.

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

 dev-util/claude-code/Manifest                     |  1 +
 dev-util/claude-code/claude-code-1.0.85-r1.ebuild | 64 +++++++++++++++++++++++
 dev-util/claude-code/claude-code-1.0.85.ebuild    | 56 ++++++++++++++++++++
 3 files changed, 121 insertions(+)

diff --git a/dev-util/claude-code/Manifest b/dev-util/claude-code/Manifest
index 86d0a43e30ca..e5fa90263467 100644
--- a/dev-util/claude-code/Manifest
+++ b/dev-util/claude-code/Manifest
@@ -1 +1,2 @@
 DIST claude-code-1.0.83.tgz 54857444 BLAKE2B d5561cc43ca911c7fde56b333357fafbe960ccc4109738e24acf9f52bacfda33a018c58deb09175e0a5a208a047f5a5c4d22dfb8f4a3fc1146da5a2a802fe227 SHA512 326fbcf2484f6e0f5e0146eb5868ab8a059e0b8c6eda11f49ecdfe9677ca597ddef11243395f6f9c21e3cdb108557befbf0d5899e20eed3c6c164e7f315ba118
+DIST claude-code-1.0.85.tgz 35955799 BLAKE2B 9c7dc6f93440917e1b9a6b5a73fb42ad10d52af2741dee06960f096c85b90d93f6a7eb9d238f057942f5e994d8127982dcb0e1fccda551ed63c708a718bbffb4 SHA512 aef2c61929c740b248ddd3fb0bf7773abe4b42f80311a7b9c2eacc1b816cf68babcedfa4f1803a5801deb8999252aee8ed9d9f6536a88dc33754e2f3501125ef

diff --git a/dev-util/claude-code/claude-code-1.0.85-r1.ebuild b/dev-util/claude-code/claude-code-1.0.85-r1.ebuild
new file mode 100644
index 000000000000..58a0bf36a0b0
--- /dev/null
+++ b/dev-util/claude-code/claude-code-1.0.85-r1.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+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}/package"
+
+# 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"
+
+IUSE="jetbrains vscode"
+RESTRICT="bindist strip"
+
+RDEPEND="
+	>=net-libs/nodejs-18
+	sys-apps/ripgrep
+"
+
+src_compile() {
+	# Skip, nothing to compile here.
+	:
+}
+
+src_install() {
+	dodoc README.md LICENSE.md
+
+	# We are using a strategy of "install everything that's left"
+	# so removing these here will prevent duplicates in /opt/claude-code
+	rm -f README.md LICENSE.md package.json || die
+	# remove vendored ripgrep
+	rm -rf vendor/ripgrep || die
+
+	# Install extentions these under /opt, and let users configure their
+	# IDEs appropriately if they have opted-into having them installed.
+	# Normally I wouldn't allow a few megs of data to be USE-flag-toggled,
+	# but removing these cuts the already-small package size in half, so
+	# it seems worth it.
+	use jetbrains || rm -r vendor/${PN}-jetbrains-plugin || die
+	use vscode || rm -r vendor/${PN}.vsix || die
+
+	insinto /opt/${PN}
+	doins -r ./*
+	fperms a+x opt/claude-code/cli.js
+
+	dodir /opt/bin
+	dosym -r /opt/${PN}/cli.js /opt/bin/claude
+
+	insinto /etc/${PN}
+	doins "${FILESDIR}/policies.json"
+
+	# nodejs defaults to disabling deprecation warnings when running code
+	# from any path containing a node_modules directory. Since we're installing
+	# outside of the realm of npm, explicitly pass an option to disable
+	# deprecation warnings so it behaves the same as it does if installed via
+	# npm. It's proprietary; not like Gentoo users can fix the warnings anyway.
+	sed -i 's/env node/env -S node --no-deprecation/' "${ED}/opt/claude-code/cli.js"
+}

diff --git a/dev-util/claude-code/claude-code-1.0.85.ebuild b/dev-util/claude-code/claude-code-1.0.85.ebuild
new file mode 100644
index 000000000000..be4d7d4c5cec
--- /dev/null
+++ b/dev-util/claude-code/claude-code-1.0.85.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="bindist 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	other threads:[~2025-08-20 14:57 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-20 14:57 Jay Faulkner [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-09-24 22:54 [gentoo-commits] repo/gentoo:master commit in: dev-util/claude-code/ Jay Faulkner
2025-09-19 16:46 Jay Faulkner
2025-09-17 16:00 Jay Faulkner
2025-09-16 15:14 Jay Faulkner
2025-09-15 17:07 Jay Faulkner
2025-09-12 18:38 Jay Faulkner
2025-09-11 15:33 Jay Faulkner
2025-09-10 15:06 Jay Faulkner
2025-09-09 22:08 Jay Faulkner
2025-09-08 14:39 Jay Faulkner
2025-09-05 18:34 Jay Faulkner
2025-09-04 17:40 Jay Faulkner
2025-09-03 22:07 Jay Faulkner
2025-09-02 17:16 Jay Faulkner
2025-08-28 15:51 Jay Faulkner
2025-08-26 15:20 Jay Faulkner
2025-08-26 15:20 Jay Faulkner
2025-08-25 15:48 Jay Faulkner
2025-08-25 15:48 Jay Faulkner
2025-08-25 15:48 Jay Faulkner
2025-08-23  3:24 Jay Faulkner
2025-08-23  3:24 Jay Faulkner
2025-08-22 16:32 Jay Faulkner
2025-08-22 16:32 Jay Faulkner
2025-08-20 14:57 Jay Faulkner
2025-08-17  4:22 Jay Faulkner
2025-08-17  1:03 Jay Faulkner
2025-08-16 23:34 Jay Faulkner
2025-08-16 23:34 Jay Faulkner
2025-08-15 17:44 Jay Faulkner
2025-08-15 17:44 Jay Faulkner
2025-08-12 22:44 Jay Faulkner
2025-08-12 22:44 Jay Faulkner
2025-08-11 16:35 Jay Faulkner
2025-08-11 16:35 Jay Faulkner
2025-08-07 20:06 Jay Faulkner
2025-08-07 20:06 Jay Faulkner
2025-07-12 22:12 Jay Faulkner
2025-07-06 20:00 Jay Faulkner
2025-07-06 20:00 Jay Faulkner
2025-07-06 20:00 Jay Faulkner
2025-06-28 17:17 Jay Faulkner
2025-06-26 20:30 Jay Faulkner
2025-06-26 20:30 Jay Faulkner
2025-06-20 19:52 Jay Faulkner
2025-06-20 19:52 Jay Faulkner
2025-06-19  3:23 Jay Faulkner
2025-06-18 21:58 Jay Faulkner
2025-06-18 21:58 Jay Faulkner
2025-06-18 21:58 Jay Faulkner
2025-06-17 22:33 Jay Faulkner
2025-06-17 15:55 Jay Faulkner
2025-06-17 15:55 Jay Faulkner
2025-06-13 21:00 Jay Faulkner
2025-06-13 21:00 Jay Faulkner
2025-06-12 18:54 Jay Faulkner
2025-06-12 18:54 Jay Faulkner
2025-06-10 20:18 Jay Faulkner
2025-06-10 20:18 Jay Faulkner
2025-06-09 17:01 Jay Faulkner
2025-06-09 17:01 Jay Faulkner
2025-06-04 18:40 Jay Faulkner
2025-06-04 18:40 Jay Faulkner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1755701801.c09f604e6ed42024bb8935aad42b5d0c00d2b8bf.jayf@gentoo \
    --to=jayf@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox