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-6wD8wBDV6Roo3J+oEYiBzZ7i1iGOZhcoiKXHV7AJjDk=";
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"
153 # FileNotFoundError: [Errno 2] No such file or directory: 'vim'
158 "--set AIDER_CHECK_UPDATE false"
159 "--set AIDER_ANALYTICS false"
163 export HOME=$(mktemp -d)
164 export AIDER_ANALYTICS="false"
167 optional-dependencies = with python3.pkgs; {
177 withPlaywright = aider-chat.overridePythonAttrs (
178 { dependencies, ... }:
180 dependencies = dependencies ++ aider-chat.optional-dependencies.playwright;
186 description = "AI pair programming in your terminal";
187 homepage = "https://github.com/paul-gauthier/aider";
188 changelog = "https://github.com/paul-gauthier/aider/blob/v${version}/HISTORY.md";
189 license = lib.licenses.asl20;
190 maintainers = with lib.maintainers; [ taha-yassine ];
191 mainProgram = "aider";