Migrate managed_pkg/1 into core marelle.