`depends_on 'lua' => :optional` will do this and generate the option automatically.