How to build this with aria2

I just put:

home.packages = [(pkgs.uget.override {
    aria2 = true;
})];

But it doesn’t build.

IIRC aria2 should be set to pkgs.aria2.


But this is even worse.

A long time ago, Nixpkgs expressions employed a “package-or-null” convention in order to establish a package as optional.
However, it is too error-prone, because the interactions between null and other expressions are unexpected.
It happened a lot when I refactored Emacs.
(And, incidentally, it happened to you right now…)

The cleaner way to do this is use a Boolean guard, say ariaSupport, and use it to control the inclusion of dependencies.

BTW Uget fixup by AndersonTorres · Pull Request #406261 · NixOS/nixpkgs · GitHub

1 Like