aider icon indicating copy to clipboard operation
aider copied to clipboard

[request] Add to nixpkgs

Open t56k opened this issue 10 months ago • 11 comments

Any interest in this being added to nixpkgs for Nix and NixOS?

t56k avatar Apr 11 '24 06:04 t56k

Would be awesome :)

clementpoiret avatar Apr 11 '24 09:04 clementpoiret

Having aider available in nixpkgs sounds nice, but it's probably not something I would have time to work on in the near term.

paul-gauthier avatar Apr 11 '24 13:04 paul-gauthier

I've made a Nix flake which gets aider up and running in a local devshell--happy to post it if there's interest (or fork the branch or whatever). I don't use Python enough to have an established methodology for repackaging from Pypi (i.e., everything I tried would fail) so this will have to do for now.

t56k avatar Apr 14 '24 03:04 t56k

I've made a Nix flake which gets aider up and running in a local devshell--happy to post it if there's interest

@t56k Can't hurt, would you mind?

Not really sure if it's something I'll tackle, but aider has piqued my interest and trying out with a flake might motivate me to package.

rehno-lindeque avatar Apr 18 '24 03:04 rehno-lindeque

I got aider packaged using dream2nix to try it out today. It's not pretty, and definitely not anywhere close to being ready to go into nixpkgs, but it is usable.

Package source in my dotfiles: https://github.com/giodamelio/nixos-configs/blob/main/src/packages/aider.nix

You can also try it quickly via my flake:

$ nix run github:giodamelio/nixos-configs#aider

giodamelio avatar May 15 '24 18:05 giodamelio

Another quick alternative, but note that it's just an experiment. I'm somewhat unlikely to update it beyond the current revision of aider (~v0.35.1-dev~ v0.44.0). Only tested on x64-64_linux.

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

rehno-lindeque avatar May 22 '24 14:05 rehno-lindeque

please add aider to nixpackages

unchainedio avatar Jul 03 '24 14:07 unchainedio

I'm open to a PR that would automate publishing aider releases to nix. I just don't use nix and would have to figure it all out from scratch.

paul-gauthier avatar Jul 03 '24 15:07 paul-gauthier

I got aider packaged using dream2nix to try it out today. It's not pretty, and definitely not anywhere close to being ready to go into nixpkgs, but it is usable.

Package source in my dotfiles: https://github.com/giodamelio/nixos-configs/blob/main/src/packages/aider.nix

You can also try it quickly via my flake:

$ nix run github:giodamelio/nixos-configs#aider

I got a slightly modified version of this working. What I had to do:

  • Move the pkgs.FetchFromGithub into a let block to reference the src later for requirements.txt (so that it used the requirements.txt packaged into the tarball). The code as-is I believe expected that to either be local or was referencing it in some other way, but it threw an error for me that it couldn't find this file.
  • Regenerate the lockfile by removing it and following the prompts to build for my architecture. If I used the existing lockfile it would use packages compiled for aarch64-darwin, and I'm building on x86-64-darwin

c-p-b avatar Jul 11 '24 20:07 c-p-b

I'm open to a PR that would automate publishing aider releases to nix. I just don't use nix and would have to figure it all out from scratch.

I don't think you need to do anything like that @paul-gauthier. (Honestly, not your responsibility)

I believe the options for people who want this are:

  1. Someone who is willing to be a nix package maintainer can attempt to get all the packages in #608 updated and merged into nixpkgs via pull requests.
    • Side-note: afaik I don't think any dream2nix packages are in nixpkgs right now, so I think my PR above is the closest thing.
    • Help can be attained on the nix discourse, etc
  2. Go upvote https://github.com/NixOS/nixpkgs/issues/330726 and hope some good soul decides to volunteer
  3. Use someone else's package definition

rehno-lindeque avatar Jul 28 '24 20:07 rehno-lindeque

Bounty posted here: https://discourse.nixos.org/t/50-packaging-bound-aider/49867

Spent 6 hours on it and I just want it works :sob:

jevy avatar Jul 30 '24 14:07 jevy

It got merged 17 hours ago! :saluting_face: https://github.com/NixOS/nixpkgs/pull/323927

arilotter avatar Aug 15 '24 15:08 arilotter

I'm going to close this issue for now, but feel free to add a comment here and I will re-open or file a new issue any time.

paul-gauthier avatar Aug 19 '24 19:08 paul-gauthier

Can confirm that the aider-chat package works. (Great timing; I've been meaning to try this out for awhile now :) Thanks to everyone involved!

mjrusso avatar Aug 19 '24 22:08 mjrusso