How would you have `nix run flakeref#target` automatically alias `target` until `gc`?

What would be your preferred way to have nix run flakeref#target automatically create an alias target until next gc? Ideally I’d be looking for a host-independent solution so that this doesn’t depend on a local script that would not somehow be declared in the flake.