part of the problem with the S54 swap is that the harness has inputs for all kinds of sensors that only the E46 M3 has.. from my understanding anyhow.. like accelerometers, and the such.... The M54 has been done, i think the guy posts on R3limited. The S54 is even a pain in the ass when transplanting into another E46.
I think you can get a S54 set up for around 5k$ ish... depending on how patient you are and how well you comb the forums. I would agree though, go to copart.com and get a car that has been rear-ended take your required items for the swap, then part the rest out and put some cash in your pocket.
You can get an M54B30 for around 2200$ from car-part.com, they are pretty good motors, i have an E46 330, with a light weight flywheel the motor is a pretty fun motor... Just doesn't have the power or RPM's of the S54
