aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-01-19 00:18:24 +0900
committernsfisis <nsfisis@gmail.com>2026-01-19 00:18:24 +0900
commitfe69988c57088027167aa98c32cfe48d20d0e54c (patch)
treebeb906fbf24dd39b9ff7e8b652087942b170a726
parent961565128266aa9bd33a75f7b1ba64d5165fdd3d (diff)
downloadnur-packages-fe69988c57088027167aa98c32cfe48d20d0e54c.tar.gz
nur-packages-fe69988c57088027167aa98c32cfe48d20d0e54c.tar.zst
nur-packages-fe69988c57088027167aa98c32cfe48d20d0e54c.zip
feat(claude-code): upgrade to 2.1.12
-rw-r--r--justfile21
-rw-r--r--pkgs/claude-code/default.nix6
-rw-r--r--pkgs/claude-code/package-lock.json4
3 files changed, 26 insertions, 5 deletions
diff --git a/justfile b/justfile
index 938a933..0ac180f 100644
--- a/justfile
+++ b/justfile
@@ -1,2 +1,23 @@
commit-upgrade PKG VERSION:
git commit -m 'feat({{PKG}}): upgrade to {{VERSION}}'
+
+update-claude-code:
+ #!/usr/bin/env bash
+ set -eu
+
+ export NIXPKGS_ALLOW_UNFREE=1
+ LATEST_VERSION=$(npm view @anthropic-ai/claude-code version)
+
+ sed -i 's|version = ".*"|version = "'"$LATEST_VERSION"'"|' pkgs/claude-code/default.nix
+ sed -i 's|hash = ".*"|hash = ""|' pkgs/claude-code/default.nix
+ sed -i 's|npmDepsHash = ".*"|npmDepsHash = ""|' pkgs/claude-code/default.nix
+
+ sed -i '1,10s|"version": ".*"|"version": "'"$LATEST_VERSION"'"|' pkgs/claude-code/package-lock.json
+
+ HASH="$(nix build --impure ".#claude-code" 2>&1 | grep "got:" | awk '{ print $2 }')"
+ sed -i 's|hash = ""|hash = "'"$HASH"'"|' pkgs/claude-code/default.nix
+
+ NPM_DEPS_HASH="$(nix build --impure ".#claude-code" 2>&1 | grep "got:" | awk '{ print $2 }')"
+ sed -i 's|npmDepsHash = ""|npmDepsHash = "'"$NPM_DEPS_HASH"'"|' pkgs/claude-code/default.nix
+
+ nix build --impure ".#claude-code"
diff --git a/pkgs/claude-code/default.nix b/pkgs/claude-code/default.nix
index 2a5ef4c..b7808fc 100644
--- a/pkgs/claude-code/default.nix
+++ b/pkgs/claude-code/default.nix
@@ -13,14 +13,14 @@
}:
buildNpmPackage (finalAttrs: {
pname = "claude-code";
- version = "2.1.9";
+ version = "2.1.12";
src = fetchzip {
url = "https://registry.npmjs.org/@anthropic-ai/claude-code/-/claude-code-${finalAttrs.version}.tgz";
- hash = "sha256-TU+54QVtcFaUErv8YB0NxmgP+0eUqa2JEjAVRHKPICs=";
+ hash = "sha256-JX72YEM2fXY7qKVkuk+UFeef0OhBffljpFBjIECHMXw=";
};
- npmDepsHash = "sha256-yZ5hFIqdKh6VYPGtdIaUq7CW9mnCyeFflr02laU8K0A=";
+ npmDepsHash = "sha256-FxyNCFlsgjXAGCGqro+VRwkarif9SzqmrMz0xgmvBco=";
postPatch = ''
cp ${./package-lock.json} package-lock.json
diff --git a/pkgs/claude-code/package-lock.json b/pkgs/claude-code/package-lock.json
index 5317603..4a301e9 100644
--- a/pkgs/claude-code/package-lock.json
+++ b/pkgs/claude-code/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "@anthropic-ai/claude-code",
- "version": "2.1.9",
+ "version": "2.1.12",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@anthropic-ai/claude-code",
- "version": "2.1.9",
+ "version": "2.1.12",
"license": "SEE LICENSE IN README.md",
"bin": {
"claude": "cli.js"