From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id C2CA215827B for ; Sun, 17 Aug 2025 01:03:58 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id ABECD340B9B for ; Sun, 17 Aug 2025 01:03:58 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id AABEF110280; Sun, 17 Aug 2025 01:03:57 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id A1EFA110280 for ; Sun, 17 Aug 2025 01:03:57 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 54239340B9B for ; Sun, 17 Aug 2025 01:03:57 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 862FA333F for ; Sun, 17 Aug 2025 01:03:55 +0000 (UTC) From: "Jay Faulkner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Jay Faulkner" Message-ID: <1755392500.436af4fc64f0989fce7e185187009f704f8ff921.jayf@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/claude-code/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-util/claude-code/claude-code-1.0.83-r1.ebuild dev-util/claude-code/metadata.xml X-VCS-Directories: dev-util/claude-code/ X-VCS-Committer: jayf X-VCS-Committer-Name: Jay Faulkner X-VCS-Revision: 436af4fc64f0989fce7e185187009f704f8ff921 X-VCS-Branch: master Date: Sun, 17 Aug 2025 01:03:55 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: e7432a40-cff6-4b2a-bdf6-048d2852767f X-Archives-Hash: 1341b00dc71e1691e09cd8f5b7a2ea7b commit: 436af4fc64f0989fce7e185187009f704f8ff921 Author: Jay Faulkner gentoo org> AuthorDate: Sun Aug 17 00:35:24 2025 +0000 Commit: Jay Faulkner gentoo org> CommitDate: Sun Aug 17 01:01:40 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=436af4fc dev-util/claude-code: Drop npm dependency Instead of using npm, we install directly via extraction, which is easy since there are no dependencies. Additionally, upon user request (gentoo-zh overlay), I'm allowing the removal of the vscode and jetbrains plugins -- the default behavior now since these are distributed and autoupdated more trivially with the ide extension manager directly. Signed-off-by: Jay Faulkner gentoo.org> dev-util/claude-code/claude-code-1.0.83-r1.ebuild | 64 +++++++++++++++++++++++ dev-util/claude-code/metadata.xml | 4 ++ 2 files changed, 68 insertions(+) diff --git a/dev-util/claude-code/claude-code-1.0.83-r1.ebuild b/dev-util/claude-code/claude-code-1.0.83-r1.ebuild new file mode 100644 index 000000000000..37d1cfb30252 --- /dev/null +++ b/dev-util/claude-code/claude-code-1.0.83-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="" + +IUSE="jetbrains vscode" +RESTRICT="strip" + +RDEPEND=" + net-libs/nodejs + 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/metadata.xml b/dev-util/claude-code/metadata.xml index 766d03b352d8..97d371f94876 100644 --- a/dev-util/claude-code/metadata.xml +++ b/dev-util/claude-code/metadata.xml @@ -9,6 +9,10 @@ Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster through natural language commands. + + Install Jetbrains IDE extension to /opt/claude-code. Does not automatically load extension. + Install VSCode IDE extension to /opt/claude-code. Does not automatically load extension. + https://docs.anthropic.com/en/docs/claude-code/overview anthropics/claude-code