feat: claude code custom packaging
This commit is contained in:
parent
4588fd6784
commit
d096c3a374
7 changed files with 48 additions and 12 deletions
|
|
@ -35,7 +35,12 @@
|
||||||
|
|
||||||
forEachSystem = f: genAttrs systems (system: f system);
|
forEachSystem = f: genAttrs systems (system: f system);
|
||||||
|
|
||||||
overlaysList = [ ghostty.overlays.default ];
|
overlaysList = [
|
||||||
|
ghostty.overlays.default
|
||||||
|
(final: prev: {
|
||||||
|
claude-code-v2 = prev.callPackage ./pkgs/claude-code { };
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
zigOverlay = if builtins.hasAttr "zig-overlay" inputs then
|
zigOverlay = if builtins.hasAttr "zig-overlay" inputs then
|
||||||
inputs."zig-overlay"
|
inputs."zig-overlay"
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ let
|
||||||
|
|
||||||
opencodeDefault = getPkgsPackage "opencode";
|
opencodeDefault = getPkgsPackage "opencode";
|
||||||
|
|
||||||
claudeDefault = getPkgsPackage "claude-code";
|
claudeDefault = getPkgsPackage "claude-code-v2";
|
||||||
|
|
||||||
toolOption = { name, description, defaultPackage, extraOptions ? { }
|
toolOption = { name, description, defaultPackage, extraOptions ? { }
|
||||||
, extraDefaults ? { } }:
|
, extraDefaults ? { } }:
|
||||||
|
|
|
||||||
|
|
@ -6,9 +6,7 @@ let
|
||||||
inherit (workspaceHelpers) workspaceFocusBindings workspaceSendBindings;
|
inherit (workspaceHelpers) workspaceFocusBindings workspaceSendBindings;
|
||||||
};
|
};
|
||||||
|
|
||||||
userSettings = import ./user-settings.nix {
|
userSettings = import ./user-settings.nix { modes = modes; };
|
||||||
modes = modes;
|
|
||||||
};
|
|
||||||
in {
|
in {
|
||||||
programs.aerospace = {
|
programs.aerospace = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
{ workspaceFocusBindings, workspaceSendBindings }:
|
{ workspaceFocusBindings, workspaceSendBindings }: {
|
||||||
{
|
|
||||||
main.binding = {
|
main.binding = {
|
||||||
"alt-h" = "focus left";
|
"alt-h" = "focus left";
|
||||||
"alt-j" = "focus down";
|
"alt-j" = "focus down";
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
{ modes }:
|
{ modes }: {
|
||||||
{
|
|
||||||
enable-normalization-flatten-containers = true;
|
enable-normalization-flatten-containers = true;
|
||||||
enable-normalization-opposite-orientation-for-nested-containers = true;
|
enable-normalization-opposite-orientation-for-nested-containers = true;
|
||||||
default-root-container-layout = "tiles";
|
default-root-container-layout = "tiles";
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,4 @@ let
|
||||||
name = "alt-shift-${ws}";
|
name = "alt-shift-${ws}";
|
||||||
value = "move-node-to-workspace ${ws}";
|
value = "move-node-to-workspace ${ws}";
|
||||||
}) workspaceNumbers);
|
}) workspaceNumbers);
|
||||||
in {
|
in { inherit workspaceNumbers workspaceFocusBindings workspaceSendBindings; }
|
||||||
inherit workspaceNumbers workspaceFocusBindings workspaceSendBindings;
|
|
||||||
}
|
|
||||||
|
|
|
||||||
37
pkgs/claude-code/default.nix
Normal file
37
pkgs/claude-code/default.nix
Normal file
|
|
@ -0,0 +1,37 @@
|
||||||
|
{ lib, stdenv, fetchurl, nodejs }:
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
pname = "claude-code";
|
||||||
|
version = "2.0.0";
|
||||||
|
|
||||||
|
src = fetchurl {
|
||||||
|
url =
|
||||||
|
"https://registry.npmjs.org/@anthropic-ai/claude-code/-/claude-code-${version}.tgz";
|
||||||
|
hash =
|
||||||
|
"sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="; # Update with actual hash
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [ nodejs ];
|
||||||
|
|
||||||
|
unpackPhase = ''
|
||||||
|
tar -xzf $src
|
||||||
|
'';
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/lib/node_modules/@anthropic-ai/claude-code
|
||||||
|
cp -r package/* $out/lib/node_modules/@anthropic-ai/claude-code/
|
||||||
|
|
||||||
|
mkdir -p $out/bin
|
||||||
|
ln -s $out/lib/node_modules/@anthropic-ai/claude-code/cli.js $out/bin/claude-code
|
||||||
|
chmod +x $out/bin/claude-code
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Anthropic Claude Code CLI v2.0.0";
|
||||||
|
homepage = "https://claude.ai/code";
|
||||||
|
license = licenses.unfree;
|
||||||
|
maintainers = [ ];
|
||||||
|
platforms = platforms.all;
|
||||||
|
mainProgram = "claude-code";
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue