Custom url for custom post types

Use add_rewrite_rule()

function custom_rewrite_rule() {
        add_rewrite_rule('^nutrition/([^/]*)/([^/]*)/?','index.php?page_id=12&food=$matches[1]&variety=$matches[2]','top');
    }
    add_action('init', 'custom_rewrite_rule', 10, 0);

you can use if ( 'myposttype' == $post->post_type ){} to make it post type specific. Weather you want to add it inside the function or wrapping the add action is up to you.