Is it possible to overwrite the input to a custom value

Would like to know if something like this is possible to do, and if so what would the best way of doing it be,

lets take this manifes nixpkgs/pkgs/applications/networking/cluster/rke2/builder.nix at 5df43628fdf08d642be8ba5b3625a6c70731c19c · NixOS/nixpkgs · GitHub

what i know is the usually if it is modifiable it has a ? in the input so it takes it, but in this case this one does not so i’m left wondering how it can be done,

here is how i have it defined

here is what i assumed should work but it does not

services.rke2 = {
        package = pkgs-unstable.rke2; # the current way of specifying the pacagke 
        package = pkgs-unstable.rke2.overrideAttrs (oldAttrs: { # what i assumed should work
          rke2Version = "v1.32.0+rke2r1";
          rke2Commit = "1182e7eb91b27b1686e69306eb2e227928a27a38";
        });
};

I don’t think you can override those arguments, because they’re not actually the arguments of the package. See how that expression (builder.nix) is called from default.nix: the file is first imported, called with lib, opts (which includes rke2Version etc.) and then the resulting function is called with callPackage.

You’d need to replicate this process, but providing your own opts.

Thanks, but ill probably drop this approach since this is way beyond my nix knowledge