# $50 Packaging Bound: Aider

**URL:** https://discourse.nixos.org/t/50-packaging-bound-aider/49867
**Category:** Jobs
**Created:** [July 30, 2024, 2:43pm UTC](https://discourse.nixos.org/t/50-packaging-bound-aider/49867 "2024-07-30T14:43:01Z")
**Posts on this page:** 20
**Page:** 2

<div class="post-metadata">

### Author: ![akaihola](https://discourse.nixos.org/user_avatar/discourse.nixos.org/akaihola/32/5848_2.png) [@akaihola](https://discourse.nixos.org/u/akaihola)
#### Post date: [August 3, 2024, 12:06pm UTC](https://discourse.nixos.org/t/50-packaging-bound-aider/49867/21 "2024-08-03T12:06:48Z")

</div>

> [@jevy](#):
>
> `nix run https://src.thehellings.com/greg/aider-flake`

This seems to work for me:

```auto
nix run https://src.thehellings.com/greg/aider-flake/-/archive/main/aider-flake-main.zip

```

Although some “interactive /help” dependencies seem to be missing:

```auto
> /help how to start                                                                                                                                                           

To use interactive /help you need to install the help extras:

/nix/store/pfv4raslwhi3101k342752v65zxkwrxq-python3-3.11.9/bin/python3.11 -m pip install aider-chat[help] --extra-index-url https://download.pytorch.org/whl/cpu

```

---

<div class="post-metadata">

### Author: ![akaihola](https://discourse.nixos.org/user_avatar/discourse.nixos.org/akaihola/32/5848_2.png) [@akaihola](https://discourse.nixos.org/u/akaihola)
#### Post date: [August 3, 2024, 12:17pm UTC](https://discourse.nixos.org/t/50-packaging-bound-aider/49867/22 "2024-08-03T12:17:09Z")

</div>

> [@Sigmanificient](#):
>
> nix run github:sigmanificient/nixpkgs/aider-0-47#aider

This works for me. Although here, too, it seems `aider[help]` was not used:

```auto
> /help how to start                                                                                                                                                           

To use interactive /help you need to install the help extras:

/nix/store/747rhv8hh2w8kqwyni7jcfqzxpldxxcv-python3-3.11.9/bin/python3.11 -m pip install aider-chat[help] --extra-index-url https://download.pytorch.org/whl/cpu

Run pip install? y

```

---

<div class="post-metadata">

### Author: ![akaihola](https://discourse.nixos.org/user_avatar/discourse.nixos.org/akaihola/32/5848_2.png) [@akaihola](https://discourse.nixos.org/u/akaihola)
#### Post date: [August 3, 2024, 12:25pm UTC](https://discourse.nixos.org/t/50-packaging-bound-aider/49867/23 "2024-08-03T12:25:16Z")

</div>

I found yet another Aider flake, which seems to build on Python 3.12:

> **[GitHub - jbotwell/nixaider: aider in a flake so I can use it in nixos](https://github.com/jbotwell/nixaider)**
>
> aider in a flake so I can use it in nixos. Contribute to jbotwell/nixaider development by creating an account on GitHub.

---

<div class="post-metadata">

### Author: ![Sigmanificient](https://discourse.nixos.org/user_avatar/discourse.nixos.org/sigmanificient/32/10706_2.png) [@Sigmanificient](https://discourse.nixos.org/u/Sigmanificient)
#### Post date: [August 3, 2024, 12:34pm UTC](https://discourse.nixos.org/t/50-packaging-bound-aider/49867/24 "2024-08-03T12:34:55Z")

</div>

Added optional dependencies for `help`, `browser` & `playwrigtht`!

---

<div class="post-metadata">

### Author: ![greg-hellings](https://discourse.nixos.org/user_avatar/discourse.nixos.org/greg-hellings/32/27521_2.png) [@greg-hellings](https://discourse.nixos.org/u/greg-hellings)
#### Post date: [August 3, 2024, 2:10pm UTC](https://discourse.nixos.org/t/50-packaging-bound-aider/49867/25 "2024-08-03T14:10:00Z")

</div>

Ah, that should be `git+https://src.thehellings.com/greg/aider-flake`.

And that flake should include an existing overlay that anyone can use to test.

---

<div class="post-metadata">

### Author: ![greg-hellings](https://discourse.nixos.org/user_avatar/discourse.nixos.org/greg-hellings/32/27521_2.png) [@greg-hellings](https://discourse.nixos.org/u/greg-hellings)
#### Post date: [August 3, 2024, 2:10pm UTC](https://discourse.nixos.org/t/50-packaging-bound-aider/49867/26 "2024-08-03T14:10:57Z")

</div>

The version in nixpkgs is going to address the problems with running in Python 3.12. There was an issue with a dependent library that had support dropped in Python 3.12 that we have since worked around in those PRs.

---

<div class="post-metadata">

### Author: ![greg-hellings](https://discourse.nixos.org/user_avatar/discourse.nixos.org/greg-hellings/32/27521_2.png) [@greg-hellings](https://discourse.nixos.org/u/greg-hellings)
#### Post date: [August 3, 2024, 2:20pm UTC](https://discourse.nixos.org/t/50-packaging-bound-aider/49867/27 "2024-08-03T14:20:51Z")

</div>

I have updated the README.md file with the full URL and also added in the dependencies for the Help. At least, I think I got the help working.

---

<div class="post-metadata">

### Author: ![jevy](https://discourse.nixos.org/user_avatar/discourse.nixos.org/jevy/32/5650_2.png) [@jevy](https://discourse.nixos.org/u/jevy)
#### Post date: [August 3, 2024, 7:48pm UTC](https://discourse.nixos.org/t/50-packaging-bound-aider/49867/28 "2024-08-03T19:48:15Z")

</div>

Okay! I added the flake to my local setup. `aider` starts but it croaks with:

```nix
  File "/nix/store/pfv4raslwhi3101k342752v65zxkwrxq-python3-3.11.9/lib/python3.11/ctypes/ __init__.py", line 454, in LoadLibrary
    return self._dlltype(name)
           ^^^^^^^^^^^^^^^^^^^
  File "/nix/store/pfv4raslwhi3101k342752v65zxkwrxq-python3-3.11.9/lib/python3.11/ctypes/ __init__.py", line 376, in __init__
    self._handle = _dlopen(self._name, mode)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: /nix/store/hfp326qlbgbkhvlqg66ywdkyjaxfzzqh-python3.11-tree-sitter-languages-1.10.2/lib/python3.11/site-packages/tree_sitter_languages/languages.so: cannot open shared object file: No such file or directory

```

---

<div class="post-metadata">

### Author: ![greg-hellings](https://discourse.nixos.org/user_avatar/discourse.nixos.org/greg-hellings/32/27521_2.png) [@greg-hellings](https://discourse.nixos.org/u/greg-hellings)
#### Post date: [August 3, 2024, 10:07pm UTC](https://discourse.nixos.org/t/50-packaging-bound-aider/49867/29 "2024-08-03T22:07:39Z")

</div>

Is that while running the flake directly, or while consuming it as an overlay?

---

<div class="post-metadata">

### Author: ![jevy](https://discourse.nixos.org/user_avatar/discourse.nixos.org/jevy/32/5650_2.png) [@jevy](https://discourse.nixos.org/u/jevy)
#### Post date: [August 3, 2024, 10:54pm UTC](https://discourse.nixos.org/t/50-packaging-bound-aider/49867/30 "2024-08-03T22:54:23Z")

</div>

That’s using the flake in this [commit](https://github.com/jevy/home-manager-nix-config/commit/52c10428075178189131fc5103fd24d1a23a7a22).

---

<div class="post-metadata">

### Author: ![willbush](https://discourse.nixos.org/user_avatar/discourse.nixos.org/willbush/32/29007_2.png) [@willbush](https://discourse.nixos.org/u/willbush)
#### Post date: [August 4, 2024, 3:37am UTC](https://discourse.nixos.org/t/50-packaging-bound-aider/49867/31 "2024-08-04T03:37:24Z")

</div>

I’ll help test. I just added it to my system similar to your commit above.

I’m getting this error: `tensorflow-2.13.0 not supported for interpreter python3.12` using rev `eaa183087b3fe704ce9f8bdb956bb66a623467fa` on main branch.

---

<div class="post-metadata">

### Author: ![jvmncs](https://discourse.nixos.org/letter_avatar_proxy/v4/letter/j/f6c823/32.png) [@jvmncs](https://discourse.nixos.org/u/jvmncs)
#### Post date: [August 4, 2024, 10:35pm UTC](https://discourse.nixos.org/t/50-packaging-bound-aider/49867/32 "2024-08-04T22:35:47Z")

</div>

Also tested with the overlay method and got the tensorflow error. When I try to switch to python311 on nixos-unstable I get the following:  
`error: aider should use 'buildPythonPackage' or 'toPythonModule' if it is to be part of the Python packages set.`

---

<div class="post-metadata">

### Author: ![greg-hellings](https://discourse.nixos.org/user_avatar/discourse.nixos.org/greg-hellings/32/27521_2.png) [@greg-hellings](https://discourse.nixos.org/u/greg-hellings)
#### Post date: [August 5, 2024, 4:33am UTC](https://discourse.nixos.org/t/50-packaging-bound-aider/49867/33 "2024-08-05T04:33:15Z")

</div>

Correct, this won’t run on Python 3.12 until I or someone can get tensorflow to run on 3.12. I’m working my way through the completely missing dependencies at the moment before I tackle that. Tensorflow is a very non-trivial package to tackle.

---

<div class="post-metadata">

### Author: ![willbush](https://discourse.nixos.org/user_avatar/discourse.nixos.org/willbush/32/29007_2.png) [@willbush](https://discourse.nixos.org/u/willbush)
#### Post date: [August 5, 2024, 4:51am UTC](https://discourse.nixos.org/t/50-packaging-bound-aider/49867/34 "2024-08-05T04:51:50Z")

</div>

Noticed your from Dallas! I’m also live in the area. Nice to know I’m not the only NixOS user in the deep south. 🙂

---

<div class="post-metadata">

### Author: ![greg-hellings](https://discourse.nixos.org/user_avatar/discourse.nixos.org/greg-hellings/32/27521_2.png) [@greg-hellings](https://discourse.nixos.org/u/greg-hellings)
#### Post date: [August 5, 2024, 4:54am UTC](https://discourse.nixos.org/t/50-packaging-bound-aider/49867/35 "2024-08-05T04:54:34Z")

</div>

I have fixed this up. At least, it now works for me locally without that error message.

---

<div class="post-metadata">

### Author: ![greg-hellings](https://discourse.nixos.org/user_avatar/discourse.nixos.org/greg-hellings/32/27521_2.png) [@greg-hellings](https://discourse.nixos.org/u/greg-hellings)
#### Post date: [August 5, 2024, 4:56am UTC](https://discourse.nixos.org/t/50-packaging-bound-aider/49867/36 "2024-08-05T04:56:12Z")

</div>

Odd. Can you try doing it again, with just a raw `nix run "git+https://...."` as elsewhere documented? It might be working better now, but I’m not completely sure. I’m down to only one more package that needs to get merged into nixpkgs before I can put the base aider package directly into the main repo.

---

<div class="post-metadata">

### Author: ![greg-hellings](https://discourse.nixos.org/user_avatar/discourse.nixos.org/greg-hellings/32/27521_2.png) [@greg-hellings](https://discourse.nixos.org/u/greg-hellings)
#### Post date: [August 5, 2024, 4:56am UTC](https://discourse.nixos.org/t/50-packaging-bound-aider/49867/37 "2024-08-05T04:56:57Z")

</div>

Indeed! The nerd runs strong in the Dallas area, but I haven’t encountered any other NixOS users, yet, to my knowledge.

---

<div class="post-metadata">

### Author: ![jevy](https://discourse.nixos.org/user_avatar/discourse.nixos.org/jevy/32/5650_2.png) [@jevy](https://discourse.nixos.org/u/jevy)
#### Post date: [August 5, 2024, 11:07am UTC](https://discourse.nixos.org/t/50-packaging-bound-aider/49867/38 "2024-08-05T11:07:23Z")

</div>

Same deal:

```nix
nix run git+https://src.thehellings.com/greg/aider-flake

Loaded /home/jevin/code/personal/typestream/.env
Aider v0.47.1
Models: claude-3-5-sonnet-20240620 with diff edit format, weak model claude-3-haiku-20240307
Git repo: .git with 325 files
Repo-map: using 1024 tokens
Use /help <question> for help, run "aider --help" to see cmd line args
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
> /help I just added a front end to the server, how does it look?                                                                                                

Traceback (most recent call last):
  File "/nix/store/aa9ghxpybkr4cz9r63w4ji21vbw6pi9v-python3.11-aider-0.47.1/bin/.aider-wrapped", line 9, in <module>
    sys.exit(main())
             ^^^^^^
  File "/nix/store/aa9ghxpybkr4cz9r63w4ji21vbw6pi9v-python3.11-aider-0.47.1/lib/python3.11/site-packages/aider/main.py", line 590, in main
    coder.run()
  File "/nix/store/aa9ghxpybkr4cz9r63w4ji21vbw6pi9v-python3.11-aider-0.47.1/lib/python3.11/site-packages/aider/coders/base_coder.py", line 617, in run
    new_user_message = self.run_loop()
                       ^^^^^^^^^^^^^^^
  File "/nix/store/aa9ghxpybkr4cz9r63w4ji21vbw6pi9v-python3.11-aider-0.47.1/lib/python3.11/site-packages/aider/coders/base_coder.py", line 653, in run_loop
    return self.commands.run(inp)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/aa9ghxpybkr4cz9r63w4ji21vbw6pi9v-python3.11-aider-0.47.1/lib/python3.11/site-packages/aider/commands.py", line 195, in run
    return self.do_run(matching_commands[0][1:], rest_inp)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/aa9ghxpybkr4cz9r63w4ji21vbw6pi9v-python3.11-aider-0.47.1/lib/python3.11/site-packages/aider/commands.py", line 170, in do_run
    return cmd_method(args)
           ^^^^^^^^^^^^^^^^
  File "/nix/store/aa9ghxpybkr4cz9r63w4ji21vbw6pi9v-python3.11-aider-0.47.1/lib/python3.11/site-packages/aider/commands.py", line 786, in cmd_help
    assistant_msg = coder.run(user_msg)
                    ^^^^^^^^^^^^^^^^^^^
  File "/nix/store/aa9ghxpybkr4cz9r63w4ji21vbw6pi9v-python3.11-aider-0.47.1/lib/python3.11/site-packages/aider/coders/base_coder.py", line 621, in run
    list(self.send_new_user_message(new_user_message))
  File "/nix/store/aa9ghxpybkr4cz9r63w4ji21vbw6pi9v-python3.11-aider-0.47.1/lib/python3.11/site-packages/aider/coders/base_coder.py", line 847, in send_new_user_message
    messages = self.format_messages()
               ^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/aa9ghxpybkr4cz9r63w4ji21vbw6pi9v-python3.11-aider-0.47.1/lib/python3.11/site-packages/aider/coders/base_coder.py", line 794, in format_messages
    messages += self.get_files_messages()
                ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/aa9ghxpybkr4cz9r63w4ji21vbw6pi9v-python3.11-aider-0.47.1/lib/python3.11/site-packages/aider/coders/base_coder.py", line 541, in get_files_messages
    repo_content = self.get_repo_map()
                   ^^^^^^^^^^^^^^^^^^^
  File "/nix/store/aa9ghxpybkr4cz9r63w4ji21vbw6pi9v-python3.11-aider-0.47.1/lib/python3.11/site-packages/aider/coders/base_coder.py", line 513, in get_repo_map
    repo_content = self.repo_map.get_repo_map(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/aa9ghxpybkr4cz9r63w4ji21vbw6pi9v-python3.11-aider-0.47.1/lib/python3.11/site-packages/aider/repomap.py", line 87, in get_repo_map
    files_listing = self.get_ranked_tags_map(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/aa9ghxpybkr4cz9r63w4ji21vbw6pi9v-python3.11-aider-0.47.1/lib/python3.11/site-packages/aider/repomap.py", line 386, in get_ranked_tags_map
    ranked_tags = self.get_ranked_tags(
                  ^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/aa9ghxpybkr4cz9r63w4ji21vbw6pi9v-python3.11-aider-0.47.1/lib/python3.11/site-packages/aider/repomap.py", line 273, in get_ranked_tags
    tags = list(self.get_tags(fname, rel_fname))
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/aa9ghxpybkr4cz9r63w4ji21vbw6pi9v-python3.11-aider-0.47.1/lib/python3.11/site-packages/aider/repomap.py", line 150, in get_tags
    data = list(self.get_tags_raw(fname, rel_fname))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/aa9ghxpybkr4cz9r63w4ji21vbw6pi9v-python3.11-aider-0.47.1/lib/python3.11/site-packages/aider/repomap.py", line 162, in get_tags_raw
    language = get_language(lang)
               ^^^^^^^^^^^^^^^^^^
  File "tree_sitter_languages/core.pyx", line 14, in tree_sitter_languages.core.get_language
  File "/nix/store/abv99ph5xl54mp6inghc9wiism1yrp9s-python3.11-tree-sitter-0.21.1/lib/python3.11/site-packages/tree_sitter/ __init__.py", line 132, in __init__
    self.lib = cdll.LoadLibrary(path_or_ptr)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/pfv4raslwhi3101k342752v65zxkwrxq-python3-3.11.9/lib/python3.11/ctypes/ __init__.py", line 454, in LoadLibrary
    return self._dlltype(name)
           ^^^^^^^^^^^^^^^^^^^
  File "/nix/store/pfv4raslwhi3101k342752v65zxkwrxq-python3-3.11.9/lib/python3.11/ctypes/ __init__.py", line 376, in __init__
    self._handle = _dlopen(self._name, mode)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: /nix/store/hfp326qlbgbkhvlqg66ywdkyjaxfzzqh-python3.11-tree-sitter-languages-1.10.2/lib/python3.11/site-packages/tree_sitter_languages/languages.so: cannot open shared object file: No such file or directory

```

---

<div class="post-metadata">

### Author: ![jvmncs](https://discourse.nixos.org/letter_avatar_proxy/v4/letter/j/f6c823/32.png) [@jvmncs](https://discourse.nixos.org/u/jvmncs)
#### Post date: [August 5, 2024, 4:10pm UTC](https://discourse.nixos.org/t/50-packaging-bound-aider/49867/39 "2024-08-05T16:10:41Z")

</div>

Reporting back here for a successful test, was able to install aider on my machine via python311, the overlay method, and your recent changes!

---

<div class="post-metadata">

### Author: ![willbush](https://discourse.nixos.org/user_avatar/discourse.nixos.org/willbush/32/29007_2.png) [@willbush](https://discourse.nixos.org/u/willbush)
#### Post date: [August 5, 2024, 7:29pm UTC](https://discourse.nixos.org/t/50-packaging-bound-aider/49867/40 "2024-08-05T19:29:53Z")

</div>

I’m also able to install it now, but getting the same error as @jevy when I try to use it. `OSError: /nix/store/hfp326qlbgbkhvlqg66ywdkyjaxfzzqh-python3.11-tree-sitter-languages-1.10.2/lib/python3.11/site-packages/tree_sitter_languages/languages.so: cannot open shared object file: No such file or directory`

[Previous page](https://discourse.nixos.org/t/50-packaging-bound-aider/49867.md?page=1)

[Next page](https://discourse.nixos.org/t/50-packaging-bound-aider/49867.md?page=3)
