Hi!
I am running into this behaviour that I am struggling to understand when trying to override a part of a package that is stiched into my configuration from a flake.
In my Nix flake, I am importing an external packaged called hugin
which exposes a Go package.
In the upstream repo, it is built with pkgs.buildGoModule;
, but it requires a specific go version. I am trying to override this external buildGoModule
with buildGo123Module
but am having a hard time doing so.
In my flake.nix, I am adding this package like this:
{
nixpkgs = {
overlays = [
(_: prev: {
go = prev.go_1_23;
buildGoModules = prev.buildGo123Modules;
hugin = hugin.packages."${prev.system}".hugin;
})
];
};
}
This works fine, and I now have a package available called hugin, however, when I try to do an override on this package:
{
nixpkgs = {
overlays = [
(_: prev: {
go = prev.go_1_23;
buildGoModules = prev.buildGo123Modules;
hugin = hugin.packages."${prev.system}".hugin.override {
buildGoModule = prev.buildGo123Module;
};
})
];
};
}
I am getting error: attribute 'override' missing
which puzzles me, I dont understand exactly why this doesnt work. I’ve tried a variaty of formats and syntaxes, but not managed.
Any hint would be useful!
Thank you!