We have a simple package for intercepting proxy Caido:
All it does is just grabs a binary release and repackage it. But the way everything is defined inside let (...) in prohibits from using overrideAttrs to manually bump the version ourselves:
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
(caido.overrideAttrs {
version = "0.55.3";
})
];
}
Is there a clean way to override just this version attribute without full package redefinition via overlay? Shouldn’t the maintainer put version inside inputs to make this easier? There are dozens of packages like this, that are bumped every now and then, but never when one need the latest version
Yes. I consider this an antipattern, at least. IMO this kind of construct should be made via the mkDerivation fixed-point, or handled with some passthru shenanigans, precisely for this reason (though in either case you’d have to override the src as well).
There’s no good way besides overriding the attributes you have access to. That said, the good news is that you can submit a PR to improve things.
You are correct that this prevents overrideAttrs from working correctly. Unfortunately it seems like that derivation is written in a rather complex way, and refactoring it to avoid the usage of let … in would be really difficult. It’s probably doable but you’d have to raise that issue directly on GitHub and ping the maintainer.