Flakes are really picking up, we get this question in slightly different forms almost every day now - also probably means we need better documentation for this exact thing, or work out the ergonomics a bit better
@mackenzie suggestion should work, and you can even do this with flake-utils:
error: All overlays passed to nixpkgs must be functions
I somehow thought that for instance, this would work:
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let pkgs = nixpkgs.legacyPackages.${system};
in {
# ...
# to use as an overlay
overlay = final: prev: {
boost = prev.boost.override {
python = final.python3;
};
rr = prev.callPackage ./pkgs/rr {
stdenv = final.stdenv_32bit;
};
};
}
);
I’ve looked at the agenix code, and followed their structure, but still got the same error. If you have any pointers to other examples, or documentation on writing an overlay for a flake, that would be great.