I recently wanted to try out (aider)[https://aider.chat], and ran into a problem that I continually run into: how do I install one-off, experimental software into my environment, without being a nix master, or spending an extreme amount of time on every new package.

In this case, it is a new python package available in pip. It isn’t available in nixpkgs, and isn’t nixified. pip2nix doesn’t work on arm64 Macs (bug here)[https://github.com/nix-community/pip2nix/issues/88], so I can’t use that to try and create a flake that works with this package. It isn’t using poetry, so poetry2nix is out.

How are you dealing with this problem? Are you all experts in nix, and writing flakes for every piece of software that you want to play around with? Do you have a “dirty” part of your environment that you install this kind of stuff into? (I looked into using pipx to install this, however that (also has a bug)[https://github.com/NixOS/nixpkgs/issues/171429] in nixpkgs.)

Thoughts?

  • thejevans@lemmy.ml
    link
    fedilink
    English
    arrow-up
    0
    ·
    edit-2
    1 year ago

    I’m certainly still learning and not an expert. For my own python projects, I’ve converted them to poetry and made a flake that I can easily tweak for development environments. For adding something like paul-gauthier/aider, there is fairly decent documentation on how to make a python nix package with examples here. It will probably be a bit slow your first time because you will have to follow along the documentation, but the second and third time you do this, it will be fairly quick.

    EDIT: specifically, you want to look at buildPythonPackage