Just a quick fix. install-licenses was trying to overwrite a file installed by a previous (custom) phase, but copy-file failed with a permission error.