$50 Packaging Bound: Aider

Aider is a pretty slick AI coding assistant. This is the second time I’ve spent hours trying to get something packaged properly. I’d like to get aider in nixpkgs. Attempted have been made with dream2nix but that doesn’t seem to suffice for nixpkgs.

Deliverables:

  • Working PR created in nixpkgs.
  • Instructions on how to test it.
  • (Ideally) merged in, but I understand that is sometimes beyond our control.

Note: I’ve posted a bounty before and paid someone previously.

6 Likes

If you have a flake, you can bring it into nixpkgs; You have everything you need to build it with Nix then :slight_smile:

@jevy I think paul-gauthier/aider#608 would in fact be suitable for nixpkgs. (This one is not based on dream2nix)

However, I just don’t want to be responsible for maintaining / updating all those packages, or going through the PR process because I’m pretty busy.

P.S. I’ve been happily using this command to run aider (but it’s rarely going to be up to date with the latest version)

nix run github:paul-gauthier/aider/pull/608/head#aider

Here’s a basic Flake I just threw together with Aider packaged up for it: https://src.thehellings.com/greg/aider-flake

There is a basic readme, including how to just run it, how to pull it into your flake, and how to pull it in as an overlay to your nxixpkgs.

1 Like

Greg - That looks pretty thorough. However, I’m looking to have this in the main nixpkgs repo for distribution. Not as a flake.

I’m happy to be the maintainer in the PR of that is a barrier.

OK Deal! Working on it.

@drupol let’s see if @greg-hellings wants to finish it up though. Don’t want to duplicate the work if we can avoid it.

Sure! Let me know the outcome.

It’s going to take three PRs to nixpkgs in order to get the dependencies in the first two, then the main package. I posted the first two last night. When they are done I’ll send in the PR for aider itself. You can see lox and grep-ast pull requests here: Pull requests · NixOS/nixpkgs · GitHub

2 Likes

@greg-hellings - Anything I can do to help push this through? Again, I appreciate your (and @drupol’s) support here.

I’m curious why, btw: clearly packaging “everything under the sun” into nixpkgs won’t scale long-term, so we need ‘something’ to be able to distribute the packaging effort more, at least for ‘leaf’ packages. I don’t doubt that flakes fall short of that for you; I’d like to understand what makes that the case.

3 Likes

This seems like more of a philosophical question related to “should be have nixpkgs hold everything vs. a distributed model”. That seems like a very different discussion…

Oh, I didn’t intend to re-hash that discussion here - it’s just that you mentioned a flake wouldn’t work for you, and I was curious why, as it might inform what we’d need instead (or how we could improve flakes) if/when we’d want to distribute nixpkgs more.

Ah gotcha. I’m fine with flakes personally. However, since this is such a popular package on Github (15k stars), I would like to sponsor it becoming something that can be installed by everyone with low friction.

2 Likes

while i am absolutely not disagreeing with you… my impression is that the community has strong support for the monorepo model and reasonable support for the “everything under the sun” model… so much so that “not as a flake” isn’t surprising to hear at all

wonderful question! though at the same time we have a current thread about how we can include home manage into the main repo which could almost be interpreted as a contradictory goal… i wonder who is having conversations about the future of nixpkgs repo and the role something like flakes may or may not have right now :thinking: these are very interesting topics to me

you’re wonderful :blush: thanks for your contributions to the ecosystem! i wasn’t aware of that particular tool but it looks fun to play with

2 Likes

I’m working through the two missing dependencies in the PR. They’re just about ready, and I should be able to get aider through without needing many changes. PRs going into nixpkgs just take a while, with all the volume of people trying to get things in.

That makes sense. I think if you could:

  1. Get the PRs up with a nix overlay to test it out.
  2. I could recruit some testers from the thread with the overlay. Hopefully that will help on the PR approvals.
    Then I think the project is complete. I don’t expect a successful merge in nixpkgs master to be a required deliverable here.
1 Like

I tried out: nix run https://src.thehellings.com/greg/aider-flake
and I’m getting:

error:
       … while fetching the input 'https://src.thehellings.com/greg/aider-flake'

       error: failed to open archive: Unrecognized archive format

Nay you try nix run github:sigmanificient/nixpkgs/aider-0-47#aider? @jevy