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) server-digest SHA256) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 14B7A15827B for ; Tue, 26 Aug 2025 15:20:44 +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 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id E990B340ECA for ; Tue, 26 Aug 2025 15:20:43 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id CEB9C110560; Tue, 26 Aug 2025 15:20:42 +0000 (UTC) Received: from smtp.gentoo.org (smtp.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 C4AF7110560 for ; Tue, 26 Aug 2025 15:20:42 +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 7F3FB340ECA for ; Tue, 26 Aug 2025 15:20:42 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E9C21306E for ; Tue, 26 Aug 2025 15:20:40 +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: <1756221615.37a82f079673495978990b23dc721dd36fa0abb8.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/Manifest dev-util/claude-code/claude-code-1.0.92.ebuild X-VCS-Directories: dev-util/claude-code/ X-VCS-Committer: jayf X-VCS-Committer-Name: Jay Faulkner X-VCS-Revision: 37a82f079673495978990b23dc721dd36fa0abb8 X-VCS-Branch: master Date: Tue, 26 Aug 2025 15:20:40 +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: 7f78dd9f-479e-4fd0-8824-940b9fa9e947 X-Archives-Hash: 1b5b85b3b1cbf55588a45b81745885ac commit: 37a82f079673495978990b23dc721dd36fa0abb8 Author: Jay Faulkner gentoo org> AuthorDate: Tue Aug 26 15:19:06 2025 +0000 Commit: Jay Faulkner gentoo org> CommitDate: Tue Aug 26 15:20:15 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=37a82f07 dev-util/claude-code: add 1.0.92 Fixes issue with claude being unable to find the gentoo-managed ripgrep. Bug: https://bugs.gentoo.org/962002 Signed-off-by: Jay Faulkner gentoo.org> dev-util/claude-code/Manifest | 1 + dev-util/claude-code/claude-code-1.0.92.ebuild | 75 ++++++++++++++++++++++++++ 2 files changed, 76 insertions(+) diff --git a/dev-util/claude-code/Manifest b/dev-util/claude-code/Manifest index 57e556c4bb4c..3cb4bcb83f89 100644 --- a/dev-util/claude-code/Manifest +++ b/dev-util/claude-code/Manifest @@ -1 +1,2 @@ DIST claude-code-1.0.90.tgz 35984624 BLAKE2B f0261cf439f6ee1f1a596112cc4d863456b2bedc693cc68273fd4cee68db24eae2524f24b1f5b66fd767f2d1eddecd3fdbe0b83aa7467436776380faf8ee567e SHA512 c1a0bb182e1f9dfca21551534bb128e0c012fe2118a7233aec96455ebf81d3b6ce923058b41a9787befe67f6ed73223c371bd4b699c54b4479157914fed282c2 +DIST claude-code-1.0.92.tgz 35962494 BLAKE2B 2e1f8a8ab2c92213580a5248be7a6add7d2af3595fc9bed6fe9b0fdfbc823902f3f5e68a0d940785f255f77c66fd143dfeb6c3fa493402c029d7fdadddf88fb2 SHA512 fd7bb026a02f5f02067fd59e64ec4723aa90b001b3c61ad173787241dbf05ba714e62be24e6af159ab24b0f6c932f16de8a42801453a5c7b3bf17c98981a4e5d diff --git a/dev-util/claude-code/claude-code-1.0.92.ebuild b/dev-util/claude-code/claude-code-1.0.92.ebuild new file mode 100644 index 000000000000..27407ebe66d5 --- /dev/null +++ b/dev-util/claude-code/claude-code-1.0.92.ebuild @@ -0,0 +1,75 @@ +# 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 + + # https://bugs.gentoo.org/962002 indicates that Claude doesn't use + # path to find the `rg` binary. Gross. So we symlink it into the place + # they expect it to be. Thanks to Leo Douglas for the patch. + if use amd64; then + dodir /opt/${PN}/vendor/ripgrep/x64-linux + dosym -r /usr/bin/rg /opt/${PN}/vendor/ripgrep/x64-linux/rg + elif use arm64; then + dodir /opt/{$PN}/vendor/ripgrep/arm64-linux + dosym -r /usr/bin/rg /opt/${PN}/vendor/ripgrep/arm64-linux/rg + fi + + 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" +}