Created
January 29, 2026 05:32
-
-
Save ink-splatters/da40a341df14914091af5b1a66fb7f0b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| fetchurl, | |
| makeWrapper, | |
| stdenvNoCC, | |
| }: let | |
| meta-info = builtins.fromJSON (builtins.readFile ./meta-info.json); | |
| inherit (meta-info) platforms version; | |
| platform = let | |
| inherit (stdenvNoCC.hostPlatform) darwinArch linuxArch; | |
| in | |
| if stdenvNoCC.isDarwin | |
| then "darwin-${darwinArch}" | |
| else if stdenvNoCC.isLinux | |
| then "linux-${linuxArch}" | |
| else "unknown"; | |
| in | |
| assert (platform != "unknown"); | |
| stdenvNoCC.mkDerivation { | |
| pname = "claude-code"; | |
| inherit version; | |
| src = fetchurl { | |
| inherit (platforms."${platform}") url sha256; | |
| }; | |
| dontUnpack = true; | |
| nativeBuildInputs = [makeWrapper]; | |
| installPhase = '' | |
| runHook preInstall | |
| install -Dm755 $src $out/bin/claude | |
| runHook postInstall | |
| ''; | |
| # TODO: find a way to disable automatic installation to ~/.local | |
| postInstall = '' | |
| wrapProgram $out/bin/claude \ | |
| --set DISABLE_AUTOUPDATER 1 \ | |
| --unset DEV | |
| ''; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment