I don't know if something changed in Raku recently (I'm brand new to it), but rakuPackage is failing to compile with the message
MAIN must be a 'sub' to allow it to be called as a CLI handler
It's referring to this line:
https://github.com/chloekek/raku-nix/blob/28820950819949e933c17cb274d1c0ffaa9bc5be/tools/install.p6#L3
Experimentally, a subroutine with a return type constraint appears to be of type Sub+{Callable[Nil]} rather than just being Sub, and it seems this isn't allowed. Removing the --> Nil should fix this.