11 python3 = python311.override {
13 packageOverrides = _: super: { tree-sitter = super.tree-sitter_0_21; };
16 aider-chat = python3.pkgs.buildPythonApplication {
21 src = fetchFromGitHub {
24 rev = "refs/tags/v${version}";
25 hash = "sha256-o5vyOaJSUcdwuHBbzgpo5RDpZLnIur5dM+b7Y7PVBXA=";
28 pythonRelaxDeps = true;
30 build-system = with python3.pkgs; [ setuptools-scm ];
32 dependencies = with python3.pkgs; [
66 jsonschema-specifications
109 tree-sitter-languages
116 # Not listed in requirements
124 buildInputs = [ portaudio ];
126 nativeCheckInputs = (with python3.pkgs; [ pytestCheckHook ]) ++ [ gitMinimal ];
128 disabledTestPaths = [
129 # Tests require network access
130 "tests/scrape/test_scrape.py"
131 # Expected 'mock' to have been called once
132 "tests/help/test_help.py"
137 # Tests require network
139 "test_get_commit_message_with_custom_prompt"
141 "test_get_commit_message"
142 # Expected 'launch_gui' to have been called once
143 "test_browser_flag_imports_streamlit"
145 "test_simple_send_with_retries"
146 # Expected 'check_version' to have been called once
147 "test_main_exit_calls_version_check"
149 ++ lib.optionals stdenv.hostPlatform.isDarwin [
150 # Tests fails on darwin
151 "test_dark_mode_sets_code_theme"
152 "test_default_env_file_sets_automatic_variable"
156 export HOME=$(mktemp -d)
157 export AIDER_CHECK_UPDATE=false
160 optional-dependencies = with python3.pkgs; {
170 withPlaywright = aider-chat.overridePythonAttrs (
171 { dependencies, ... }:
173 dependencies = dependencies ++ aider-chat.optional-dependencies.playwright;
179 description = "AI pair programming in your terminal";
180 homepage = "https://github.com/paul-gauthier/aider";
181 changelog = "https://github.com/paul-gauthier/aider/blob/v${version}/HISTORY.md";
182 license = lib.licenses.asl20;
183 maintainers = with lib.maintainers; [ taha-yassine ];
184 mainProgram = "aider";