Compare commits
3 Commits
63bf19b85f
...
7011fb27a5
| Author | SHA1 | Date | |
|---|---|---|---|
| 7011fb27a5 | |||
| 1ff8b81f44 | |||
| 55f13dfb08 |
@@ -4,6 +4,30 @@ let
|
||||
leader = "cmd"; # Change this to experiment with different leader keys (e.g., "cmd", "ctrl")
|
||||
in
|
||||
{
|
||||
# Claude Code Package Override for Corporate Work Environment
|
||||
#
|
||||
# This overlay overrides the default claude-code package specifically for work environments
|
||||
# where corporate network restrictions may prevent access to npm registry distributions.
|
||||
#
|
||||
# Context:
|
||||
# - The default claude-code package (used in home environments) fetches from npm registry
|
||||
# - Corporate firewalls and security policies often block npm registry access
|
||||
# - Our custom claude-code package uses Google Cloud Storage distribution as a workaround
|
||||
# - This maintains the same package name across environments while adapting to network constraints
|
||||
#
|
||||
# Environment-specific behavior:
|
||||
# - Home environments: Use standard npm-distributed claude-code package
|
||||
# - Work environments: Use custom binary-distributed claude-code package from GCS
|
||||
#
|
||||
# This approach ensures consistent tooling availability regardless of network environment
|
||||
# while respecting corporate security policies.
|
||||
nixpkgs.overlays = [
|
||||
(final: prev: {
|
||||
unstable = prev.unstable // {
|
||||
claude-code = prev.custom.claude-code;
|
||||
};
|
||||
})
|
||||
];
|
||||
# Home Manager configuration for Darwin work laptop
|
||||
# Corporate-friendly setup with essential development tools
|
||||
|
||||
|
||||
@@ -419,7 +419,7 @@ in {
|
||||
|
||||
#workspaces button {
|
||||
padding: 0 8px;
|
||||
background-color: transparent;
|
||||
background-color: #333333;
|
||||
color: #ffffff;
|
||||
border: none;
|
||||
}
|
||||
|
||||
@@ -36,12 +36,12 @@ in
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = [
|
||||
pkgs.unstable.claude-code
|
||||
pkgs.unstable.claude-code-router
|
||||
pkgs.unstable.codex
|
||||
|
||||
# Custom packages
|
||||
pkgs.custom.tea-rbw
|
||||
pkgs.custom.claude-cli
|
||||
];
|
||||
|
||||
# Install Claude Code humanlayer command and agent plugins
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
, stdenv
|
||||
, fetchurl
|
||||
, autoPatchelfHook
|
||||
, makeWrapper
|
||||
}:
|
||||
|
||||
let
|
||||
@@ -30,7 +29,7 @@ let
|
||||
src = srcs.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
|
||||
|
||||
in stdenv.mkDerivation {
|
||||
pname = "claude-cli";
|
||||
pname = "claude-code";
|
||||
inherit version;
|
||||
|
||||
src = fetchurl {
|
||||
34
packages/claude-code/npm.nix
Normal file
34
packages/claude-code/npm.nix
Normal file
@@ -0,0 +1,34 @@
|
||||
{ lib
|
||||
, buildNpmPackage
|
||||
, fetchurl
|
||||
, nodejs_18
|
||||
}:
|
||||
|
||||
buildNpmPackage {
|
||||
pname = "claude-cli";
|
||||
version = "0.2.65";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://registry.npmjs.org/@anthropic-ai/claude-code/-/claude-code-0.2.65.tgz";
|
||||
sha256 = "0wwaqq7k9p5aw4vqhfpdgf3da09x64q55wibqaprk6kjvn130i92";
|
||||
};
|
||||
|
||||
npmDepsHash = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="; # Will be updated after first build
|
||||
|
||||
nodejs = nodejs_18;
|
||||
|
||||
# Don't run npm audit or other network operations during build
|
||||
npmConfigHook = ''
|
||||
npm config set audit false
|
||||
npm config set fund false
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Terminal-based AI coding assistant from Anthropic (npm distribution)";
|
||||
homepage = "https://www.anthropic.com/claude-code";
|
||||
license = licenses.unfree;
|
||||
maintainers = [ ];
|
||||
platforms = platforms.all;
|
||||
mainProgram = "claude";
|
||||
};
|
||||
}
|
||||
@@ -127,6 +127,6 @@ echo " aarch64-linux: $SHA_ARM64_LINUX"
|
||||
echo ""
|
||||
echo "Next steps:"
|
||||
echo " 1. Review changes: git diff $NIX_FILE"
|
||||
echo " 2. Test build: NIXPKGS_ALLOW_UNFREE=1 nix-build -E 'with import <nixpkgs> { config.allowUnfree = true; }; callPackage ./packages/claude-cli {}'"
|
||||
echo " 2. Test build: NIXPKGS_ALLOW_UNFREE=1 nix-build -E 'with import <nixpkgs> { config.allowUnfree = true; }; callPackage ./packages/claude-code {}'"
|
||||
echo " 3. Verify version: ./result/bin/claude --version"
|
||||
echo " 4. Commit: git add $NIX_FILE && git commit -m 'claude-cli: Update to version $NEW_VERSION'"
|
||||
echo " 4. Commit: git add $NIX_FILE && git commit -m 'claude-code: Update to version $NEW_VERSION'"
|
||||
@@ -3,5 +3,5 @@
|
||||
vulkanHDRLayer = pkgs.callPackage ./vulkan-hdr-layer {};
|
||||
tea-rbw = pkgs.callPackage ./tea-rbw {};
|
||||
app-launcher-server = pkgs.callPackage ./app-launcher-server {};
|
||||
claude-cli = pkgs.callPackage ./claude-cli {};
|
||||
claude-code = pkgs.callPackage ./claude-code {};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user