[NixOS] Enable codex override
This commit is contained in:
@@ -1,10 +1,19 @@
|
|||||||
final: prev:
|
final: prev:
|
||||||
let
|
let
|
||||||
|
# Enable/disable version overrides (set to false to use nixpkgs versions)
|
||||||
|
enableCodexOverride = true;
|
||||||
|
enableClaudeCodeOverride = true;
|
||||||
|
|
||||||
# Codex version override - update these values to bump the version
|
# Codex version override - update these values to bump the version
|
||||||
codexVersion = {
|
codexVersion = {
|
||||||
version = "0.86.0";
|
version = "0.88.0";
|
||||||
hash = "sha256-sypqDp67nMnxSmdUs2W8TCmfe2Ye9jO3vXLOpNeqjlI=";
|
hash = "sha256-Ff6Ut1GwRPd2oB4/YojKgS/CYMG0TVizXOHKfpKClqY=";
|
||||||
cargoHash = "sha256-Ryr5mFc+StT1d+jBtRsrOzMtyEJf7W1HbMbnC84ps4s=";
|
cargoHash = "sha256-eLao+Jaq7+Bu9QNHDJYD3zX2BQvlX/BSTYr4gpCD++Q=";
|
||||||
|
};
|
||||||
|
claudeCodeVersion = {
|
||||||
|
version = "2.1.22";
|
||||||
|
hash = "sha256-OqvLiwB5TwZaxDvyN/+/+eueBdWNaYxd81cd5AZK/mA=";
|
||||||
|
npmDepsHash = "";
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
@@ -13,20 +22,32 @@ in
|
|||||||
dontCheckRuntimeDeps = true;
|
dontCheckRuntimeDeps = true;
|
||||||
});
|
});
|
||||||
|
|
||||||
# codex = prev.codex.overrideAttrs (oldAttrs: rec {
|
# XXX: Don't remove this code - use enableCodexOverride flag instead.
|
||||||
# inherit (codexVersion) version cargoHash;
|
# nixpkgs often lags behind and codex moves extremely quickly
|
||||||
# src = prev.fetchFromGitHub {
|
codex = if enableCodexOverride then prev.codex.overrideAttrs (oldAttrs: rec {
|
||||||
# owner = "openai";
|
inherit (codexVersion) version cargoHash;
|
||||||
# repo = "codex";
|
src = prev.fetchFromGitHub {
|
||||||
# tag = "rust-v${codexVersion.version}";
|
owner = "openai";
|
||||||
# inherit (codexVersion) hash;
|
repo = "codex";
|
||||||
# };
|
tag = "rust-v${codexVersion.version}";
|
||||||
# cargoDeps = prev.rustPlatform.fetchCargoVendor {
|
inherit (codexVersion) hash;
|
||||||
# inherit src;
|
};
|
||||||
# sourceRoot = "${src.name}/codex-rs";
|
cargoDeps = prev.rustPlatform.fetchCargoVendor {
|
||||||
# hash = cargoHash;
|
inherit src;
|
||||||
# };
|
sourceRoot = "${src.name}/codex-rs";
|
||||||
# });
|
hash = cargoHash;
|
||||||
|
};
|
||||||
|
}) else prev.codex;
|
||||||
|
|
||||||
|
# XXX: Don't remove this code - use enableClaudeCodeOverride flag instead.
|
||||||
|
# nixpkgs often lags behind and claude-code moves extremely quickly
|
||||||
|
claude-code = if enableClaudeCodeOverride then prev.claude-code.overrideAttrs (oldAttrs: {
|
||||||
|
inherit (claudeCodeVersion) version npmDepsHash;
|
||||||
|
src = prev.fetchurl {
|
||||||
|
url = "https://registry.npmjs.org/@anthropic-ai/claude-code/-/claude-code-${claudeCodeVersion.version}.tgz";
|
||||||
|
inherit (claudeCodeVersion) hash;
|
||||||
|
};
|
||||||
|
}) else prev.claude-code;
|
||||||
|
|
||||||
# nvidia-container-toolkit = prev.nvidia-container-toolkit.overrideAttrs(old: {
|
# nvidia-container-toolkit = prev.nvidia-container-toolkit.overrideAttrs(old: {
|
||||||
# postInstall = ''
|
# postInstall = ''
|
||||||
|
|||||||
Reference in New Issue
Block a user