Uniform asymptotics for ruin probabilities in a nonstandard compound renewal risk model