public function getSourceInfo($version = 'latest', $ext = null)
    {
        $info = $this->getInfo($version);

        if (!empty($ext) && isset($info['source'][$ext])) {
            return $info['source'][$ext];
        }

        foreach (['xz', 'bz2', 'gz'] as $ext) {
            if (isset($info['source'][$ext])) {
                return $info['source'][$ext];
            }
        }

        throw new \Exception("No source information for version $version.");
    }