aider-chat: move to top-level (#425652)

This commit is contained in:
dotlambda 2025-07-16 08:44:53 -07:00 committed by GitHub
commit f3976c7054
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 16 additions and 140 deletions

View File

@ -1,140 +1,30 @@
{ {
lib, lib,
stdenv, stdenv,
buildPythonPackage, python312Packages,
fetchFromGitHub, fetchFromGitHub,
replaceVars, replaceVars,
gitMinimal, gitMinimal,
portaudio, portaudio,
playwright-driver, playwright-driver,
pythonOlder,
pythonAtLeast,
setuptools-scm,
aiohappyeyeballs,
aiohttp,
aiosignal,
annotated-types,
anyio,
attrs,
backoff,
beautifulsoup4,
cachetools,
certifi,
cffi,
charset-normalizer,
click,
configargparse,
diff-match-patch,
diskcache,
distro,
filelock,
flake8,
frozenlist,
fsspec,
gitdb,
gitpython,
google-ai-generativelanguage,
google-generativeai,
grep-ast,
h11,
hf-xet,
httpcore,
httpx,
huggingface-hub,
idna,
importlib-resources,
jinja2,
jiter,
json5,
jsonschema,
jsonschema-specifications,
litellm,
markdown-it-py,
markupsafe,
mccabe,
mdurl,
multidict,
networkx,
numpy,
openai,
oslex,
packaging,
pathspec,
pexpect,
pillow,
prompt-toolkit,
psutil,
ptyprocess,
pycodestyle,
pycparser,
pydantic,
pydantic-core,
pydub,
pyflakes,
pygments,
pypandoc,
pyperclip,
python-dotenv,
pyyaml,
referencing,
regex,
requests,
rich,
rpds-py,
scipy,
shtab,
smmap,
sniffio,
sounddevice,
socksio,
soundfile,
soupsieve,
tiktoken,
tokenizers,
tqdm,
tree-sitter,
tree-sitter-language-pack,
typing-extensions,
typing-inspection,
urllib3,
watchfiles,
wcwidth,
yarl,
zipp,
pip,
mixpanel,
monotonic,
posthog,
propcache,
python-dateutil,
pytestCheckHook,
greenlet,
playwright,
pyee,
streamlit,
llama-index-core,
llama-index-embeddings-huggingface,
torch,
nltk,
boto3,
nix-update-script, nix-update-script,
}: }:
let let
aider-nltk-data = nltk.dataDir (d: [ # dont support python 3.13 (Aider-AI/aider#3037)
python3Packages = python312Packages;
aider-nltk-data = python3Packages.nltk.dataDir (d: [
d.punkt-tab d.punkt-tab
d.stopwords d.stopwords
]); ]);
version = "0.85.1"; version = "0.85.1";
aider-chat = buildPythonPackage { aider-chat = python3Packages.buildPythonApplication {
pname = "aider-chat"; pname = "aider-chat";
inherit version; inherit version;
pyproject = true; pyproject = true;
# dont support python 3.13 (Aider-AI/aider#3037)
disabled = pythonOlder "3.10" || pythonAtLeast "3.13";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "Aider-AI"; owner = "Aider-AI";
repo = "aider"; repo = "aider";
@ -144,9 +34,9 @@ let
pythonRelaxDeps = true; pythonRelaxDeps = true;
build-system = [ setuptools-scm ]; build-system = with python3Packages; [ setuptools-scm ];
dependencies = [ dependencies = with python3Packages; [
aiohappyeyeballs aiohappyeyeballs
aiohttp aiohttp
aiosignal aiosignal
@ -251,13 +141,13 @@ let
buildInputs = [ portaudio ]; buildInputs = [ portaudio ];
nativeCheckInputs = [ nativeCheckInputs = [
pytestCheckHook python3Packages.pytestCheckHook
gitMinimal gitMinimal
]; ];
patches = [ patches = [
(replaceVars ./fix-flake8-invoke.patch { (replaceVars ./fix-flake8-invoke.patch {
flake8 = lib.getExe flake8; flake8 = lib.getExe python3Packages.flake8;
}) })
]; ];
@ -308,7 +198,7 @@ let
export AIDER_ANALYTICS="false" export AIDER_ANALYTICS="false"
''; '';
optional-dependencies = { optional-dependencies = with python3Packages; {
playwright = [ playwright = [
greenlet greenlet
playwright playwright

View File

@ -201,27 +201,15 @@ with pkgs;
} ../build-support/setup-hooks/add-bin-to-path.sh } ../build-support/setup-hooks/add-bin-to-path.sh
) { }; ) { };
aider-chat = with python312Packages; toPythonApplication aider-chat; aider-chat-with-playwright = aider-chat.withOptional { withPlaywright = true; };
aider-chat-with-playwright = aider-chat-with-browser = aider-chat.withOptional { withBrowser = true; };
with python312Packages;
toPythonApplication (aider-chat.withOptional { withPlaywright = true; });
aider-chat-with-browser = aider-chat-with-help = aider-chat.withOptional { withHelp = true; };
with python312Packages;
toPythonApplication (aider-chat.withOptional { withBrowser = true; });
aider-chat-with-help = aider-chat-with-bedrock = aider-chat.withOptional { withBedrock = true; };
with python312Packages;
toPythonApplication (aider-chat.withOptional { withHelp = true; });
aider-chat-with-bedrock = aider-chat-full = aider-chat.withOptional { withAll = true; };
with python312Packages;
toPythonApplication (aider-chat.withOptional { withBedrock = true; });
aider-chat-full =
with python312Packages;
toPythonApplication (aider-chat.withOptional { withAll = true; });
autoreconfHook = callPackage ( autoreconfHook = callPackage (
{ {

View File

@ -144,8 +144,6 @@ self: super: with self; {
ahocorasick-rs = callPackage ../development/python-modules/ahocorasick-rs { }; ahocorasick-rs = callPackage ../development/python-modules/ahocorasick-rs { };
aider-chat = callPackage ../development/python-modules/aider-chat { };
aigpy = callPackage ../development/python-modules/aigpy { }; aigpy = callPackage ../development/python-modules/aigpy { };
ailment = callPackage ../development/python-modules/ailment { }; ailment = callPackage ../development/python-modules/ailment { };